.686p
.mmx
.model flat, c
option casemap :none

include main_type.inc
include main_data.inc
include main74_1.inc
include main74_2.inc
include main74_3.inc
include main74_4.inc
include main74_5.inc
include main74_7.inc
include main74_8.inc
include main74_9.inc
include main74_10.inc
include main74_11.inc

.code
; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_4321F0(int, char *)
sub_4321F0 proc	near			; CODE XREF: sub_4322D0+E3p
					; sub_4322D0+118p ...

arg_0= dword ptr  4
arg_4= dword ptr  8

mov	ecx, [esp+arg_0]
push	ebx
mov	eax, ecx
push	esi
cdq
mov	esi, 3E8h
push	edi
idiv	esi
mov	eax, ecx
mov	edi, 0F4240h
mov	ebx, 3B9ACA00h
mov	esi, edx
cdq
idiv	edi
mov	eax, 10624DD3h
imul	edx
sar	edx, 6
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
mov	eax, ecx
mov	edi, edx
cdq
idiv	ebx
mov	eax, 431BDE83h
imul	edx
sar	edx, 12h
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
cmp	ecx, ebx
jl	short loc_43226A
push	esi
push	edi
mov	eax, 44B82FA1h
push	edx
imul	ecx
sar	edx, 1Ch
mov	ecx, edx
shr	ecx, 1Fh
add	edx, ecx
push	edx
mov	edx, [esp+1Ch+arg_4]
push	offset aD03d03d03d		; "%d,%03d,%03d,%03d"
push	edx				; char *
call	_sprintf
add	esp, 18h
pop	edi
pop	esi
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_43226A:				; CODE XREF: sub_4321F0+4Dj
cmp	ecx, 0F4240h
jl	short loc_43228B
mov	eax, [esp+0Ch+arg_4]
push	esi
push	edi
push	edx
push	offset aD03d03d			; "%d,%03d,%03d"
push	eax				; char *
call	_sprintf
add	esp, 14h
pop	edi
pop	esi
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_43228B:				; CODE XREF: sub_4321F0+80j
cmp	ecx, 3E8h
push	esi
jl	short loc_4322AB
mov	ecx, [esp+10h+arg_4]
push	edi
push	offset aD03d			; "%d,%03d"
push	ecx				; char *
call	_sprintf
add	esp, 10h
pop	edi
pop	esi
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_4322AB:				; CODE XREF: sub_4321F0+A2j
mov	edx, [esp+10h+arg_4]
push	offset aD_0			; "%d"
push	edx				; char *
call	_sprintf
add	esp, 0Ch
pop	edi
pop	esi
pop	ebx
retn
sub_4321F0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4322D0 proc	near			; CODE XREF: sub_43BD90+2Ap

var_68=	dword ptr -68h
var_64=	byte ptr -64h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

sub	esp, 68h
push	ebx
push	ebp
push	esi
mov	esi, [esp+74h+arg_8]
mov	edx, dword ptr newData3700h1_7BA8518
push	edi
movsx	eax, word ptr [esi]
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
add	eax, ecx
xor	ebp, ebp
mov	[esp+78h+arg_8], eax
mov	dword ptr dword_7CC88D4, ebp
mov	dword ptr dword_7CC88D8, ebp
mov	eax, offset byte_7CAF3C8

loc_43230C:				; CODE XREF: sub_4322D0+47j
mov	byte ptr [eax],	0
add	eax, 64h
cmp	eax, offset word_7CAFF80
jl	short loc_43230C
push	offset asc_47CE34		; "\n"
push	offset byte_7CAF3C8		; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	edx, dword ptr dword_7CC88D8
add	esp, 8
inc	eax
inc	edx
mov	dword ptr dword_7CC88D4, eax
mov	dword ptr dword_7CC88D8, edx
mov	edi, [esi+4]
mov	cx, [esi]
sar	edi, 3
and	edi, 0Fh
cmp	cx, 0EDh
mov	[esp+78h+var_68], edi
jz	short loc_43237A
cmp	cx, 0EEh
jz	short loc_43237A
cmp	cx, 0CFh
jz	short loc_43237A
cmp	edi, 7
jge	short loc_43237A
mov	bl, [esi+24h]
xor	dl, dl
cmp	dl, bl
sbb	ebx, ebx
neg	ebx
jmp	short loc_43237F
; ---------------------------------------------------------------------------

loc_43237A:				; CODE XREF: sub_4322D0+88j
					; sub_4322D0+8Fj ...
mov	ebx, 3

loc_43237F:				; CODE XREF: sub_4322D0+A8j
cmp	cx, 0ECh
jz	loc_432462
mov	cl, byte_7CC88C0
test	cl, cl
jz	loc_432462
mov	al, [esp+78h+arg_C]
test	al, al
jz	short loc_4323D7
lea	eax, [esp+78h+var_64]
push	eax				; char *
push	ebp
push	esi
call	sub_426010
add	esp, 8
push	eax				; int
call	sub_4321F0
mov	eax, dword ptr dword_7CC88D4
lea	ecx, [esp+80h+var_64]
push	ecx
push	offset byte_7B80590
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax
jmp	short loc_43240A
; ---------------------------------------------------------------------------

loc_4323D7:				; CODE XREF: sub_4322D0+D1j
lea	ecx, [esp+78h+var_64]
push	ecx				; char *
push	1
push	esi
call	sub_426010
add	esp, 8
push	eax				; int
call	sub_4321F0
mov	eax, dword ptr dword_7CC88D4
lea	edx, [esp+80h+var_64]
push	edx
push	offset byte_7B806BC		; char *
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *

loc_43240A:				; CODE XREF: sub_4322D0+105j
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 14h
mov	dword ptr dword_7CAFFC4[eax*4], ebx
mov	dword ptr dword_7CC6378[eax*4], 1
inc	eax
push	offset asc_47CE34		; "\n"
mov	dword ptr dword_7CC88D4, eax
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	ecx, dword ptr dword_7CC88D8
add	esp, 8
inc	eax
inc	ecx
mov	dword ptr dword_7CC88D4, eax
mov	dword ptr dword_7CC88D8, ecx

loc_432462:				; CODE XREF: sub_4322D0+B4j
					; sub_4322D0+C2j
mov	cx, [esi]
cmp	cx, 0ECh
jnz	loc_4324F3
mov	ecx, edi
sub	ecx, ebp
jz	short loc_4324D3
dec	ecx
jz	short loc_4324B3
dec	ecx
jnz	loc_4325E9
xor	ecx, ecx
lea	eax, [eax+eax*4]
mov	cl, [esi+1Ah]
lea	eax, [eax+eax*4]
lea	ecx, [ecx+ecx*4]
lea	ecx, [ecx+ecx*4]
lea	edx, (dword_47D030+18h)[ecx*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	edx
push	offset aS_0			; "%s"
push	ecx				; char *
call	_sprintf
add	esp, 0Ch
jmp	loc_4325E4
; ---------------------------------------------------------------------------

loc_4324B3:				; CODE XREF: sub_4322D0+1A7j
lea	eax, [eax+eax*4]
push	offset byte_7B83344		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
add	esp, 8
jmp	loc_4325E4
; ---------------------------------------------------------------------------

loc_4324D3:				; CODE XREF: sub_4322D0+1A4j
lea	eax, [eax+eax*4]
push	offset byte_7B83218		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
add	esp, 8
jmp	loc_4325E4
; ---------------------------------------------------------------------------

loc_4324F3:				; CODE XREF: sub_4322D0+19Aj
cmp	cx, 0CBh
jnz	short loc_432528
mov	edx, dword ptr newData900h1_7B7BCE4
lea	ecx, [edi+edi*8+10Eh]
lea	eax, [eax+eax*4]
push	offset byte_7B83470
lea	ecx, [edx+ecx*4]
lea	edx, [eax+eax*4]
push	ecx
push	offset aSS_1			; "%s %s"
lea	eax, byte_7CAF3C8[edx*4]
push	eax
jmp	loc_4325DC
; ---------------------------------------------------------------------------

loc_432528:				; CODE XREF: sub_4322D0+228j
cmp	cx, 0DAh
jnz	short loc_432597
mov	ecx, [esp+78h+var_68]
xor	edi, edi
mov	ebp, dword ptr dword_47D030[ecx*4]
mov	ecx, offset byte_7B786D8

loc_432541:				; CODE XREF: sub_4322D0+283j
xor	edx, edx
mov	dl, [ecx]
cmp	ebp, edx
jz	short loc_432560
add	ecx, 36h
inc	edi
cmp	ecx, offset newData384h_7B7BCD8
jl	short loc_432541
mov	edi, [esp+78h+var_68]
xor	ebp, ebp
jmp	loc_4325E9
; ---------------------------------------------------------------------------

loc_432560:				; CODE XREF: sub_4322D0+277j
imul	edi, 36h
lea	eax, [eax+eax*4]
add	edi, offset byte_7B786D9
push	offset byte_7B8359C
push	edi
lea	eax, [eax+eax*4]
push	offset aSS_1			; "%s %s"
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	edi, [esp+88h+var_68]
add	esp, 10h
xor	ebp, ebp
jmp	short loc_4325E9
; ---------------------------------------------------------------------------

loc_432597:				; CODE XREF: sub_4322D0+25Dj
cmp	edi, ebp
jnz	short loc_4325C0
mov	edx, [esp+78h+arg_8]
lea	eax, [eax+eax*4]
push	edx
push	offset aS_0			; "%s"
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
add	esp, 0Ch
jmp	short loc_4325E4
; ---------------------------------------------------------------------------

loc_4325C0:				; CODE XREF: sub_4322D0+2C9j
mov	edx, [esp+78h+arg_8]
lea	eax, [eax+eax*4]
push	edi
push	edx
lea	eax, [eax+eax*4]
push	offset aSD_0			; "%s +%d"
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *

loc_4325DC:				; CODE XREF: sub_4322D0+253j
call	_sprintf
add	esp, 10h

loc_4325E4:				; CODE XREF: sub_4322D0+1DEj
					; sub_4322D0+1FEj ...
mov	eax, dword ptr dword_7CC88D4

loc_4325E9:				; CODE XREF: sub_4322D0+1AAj
					; sub_4322D0+28Bj ...
mov	dword ptr dword_7CAFFC4[eax*4], ebx
mov	dword ptr dword_7CC6378[eax*4], 1
inc	eax
push	offset asc_47CE34		; "\n"
mov	dword ptr dword_7CC88D4, eax
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	edx, dword ptr dword_7CC88D8
add	esp, 8
inc	eax
inc	edx
mov	dword ptr dword_7CC88D4, eax
mov	dword ptr dword_7CC88D8, edx
cmp	word ptr [esi],	0ECh
jnz	short loc_432674
cmp	edi, 1
jg	short loc_432674
lea	eax, [eax+eax*4]
push	offset byte_7B8485C		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432674:				; CODE XREF: sub_4322D0+369j
					; sub_4322D0+36Ej
mov	cx, [esi+0Ch]
cmp	cx, bp
jz	loc_432726
mov	dx, [esi]
and	edx, 0FFFFFFF0h
cmp	dx, 0F0h
jnz	short loc_4326C5
xor	edx, edx
lea	eax, [eax+eax*4]
mov	dx, [esi+0Eh]
and	ecx, 0FFFFh
lea	eax, [eax+eax*4]
push	edx
push	ecx
push	offset byte_7B7EE20
lea	ecx, byte_7CAF3C8[eax*4]
push	offset aSDD			; "%s: %d ~ %d"
push	ecx				; char *
call	_sprintf
mov	ebx, [esp+8Ch+arg_8]
add	esp, 14h
jmp	short loc_43270B
; ---------------------------------------------------------------------------

loc_4326C5:				; CODE XREF: sub_4322D0+3BCj
mov	ebx, [esp+78h+arg_8]
xor	edx, edx
mov	dx, [esi+0Eh]
and	ecx, 0FFFFh
push	edx
push	ecx
xor	ecx, ecx
lea	eax, [eax+eax*4]
mov	cl, [ebx+1Eh]
lea	eax, [eax+eax*4]
lea	ecx, [ecx+ecx*2]
lea	ecx, [ecx+ecx*4]
lea	ecx, [ecx+ecx*4]
lea	edx, (byte_7B7C9CC+21FCh)[ecx*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	edx
push	offset aSDD			; "%s: %d ~ %d"
push	ecx				; char *
call	_sprintf
add	esp, 14h

loc_43270B:				; CODE XREF: sub_4322D0+3F3j
mov	eax, dword ptr dword_7CC88D4
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax
jmp	short loc_43272D
; ---------------------------------------------------------------------------

loc_432726:				; CODE XREF: sub_4322D0+3ABj
mov	ebx, [esp+78h+arg_8]

loc_43272D:				; CODE XREF: sub_4322D0+454j
mov	cl, [ebx+27h]
test	cl, cl
jz	short loc_43276F
lea	eax, [eax+eax*4]
and	ecx, 0FFh
push	ecx
push	offset byte_7B807E8		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_43276F:				; CODE XREF: sub_4322D0+462j
mov	cx, [esi+12h]
cmp	cx, bp
jz	short loc_4327B3
and	ecx, 0FFFFh
lea	eax, [eax+eax*4]
push	ecx
push	offset byte_7B80914		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4327B3:				; CODE XREF: sub_4322D0+4A6j
mov	cx, [esi+14h]
cmp	cx, bp
jz	short loc_4327F7
lea	eax, [eax+eax*4]
and	ecx, 0FFFFh
push	ecx
push	offset byte_7B80A40		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4327F7:				; CODE XREF: sub_4322D0+4EAj
mov	cl, [ebx+24h]
test	cl, cl
jz	short loc_432838
lea	eax, [eax+eax*4]
xor	edx, edx
mov	dl, [esi+10h]
lea	eax, [eax+eax*4]
push	edx
push	offset byte_7B80B6C		; char *
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432838:				; CODE XREF: sub_4322D0+52Cj
mov	cl, [ebx+28h]
test	cl, cl
jz	short loc_43287A
lea	eax, [eax+eax*4]
and	ecx, 0FFh
push	ecx
push	offset byte_7B80C98		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_43287A:				; CODE XREF: sub_4322D0+56Dj
cmp	word ptr [esi],	0EBh
jnz	short loc_4328B5
lea	eax, [eax+eax*4]
push	offset byte_7BA5A0C		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4328B5:				; CODE XREF: sub_4322D0+5AFj
cmp	word ptr [esi],	0EDh
jnz	short loc_4328F0
lea	eax, [eax+eax*4]
push	offset byte_7BA5B38		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4328F0:				; CODE XREF: sub_4322D0+5EAj
cmp	word ptr [esi],	0EEh
jnz	short loc_43292B
lea	eax, [eax+eax*4]
push	offset byte_7BA5C64		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_43292B:				; CODE XREF: sub_4322D0+625j
cmp	word ptr [esi],	0CFh
jnz	short loc_432966
lea	eax, [eax+eax*4]
push	offset byte_7BA5D90		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432966:				; CODE XREF: sub_4322D0+660j
cmp	word ptr [esi],	0D0h
jnz	short loc_4329A1
lea	eax, [eax+eax*4]
push	offset byte_7BA5EBC		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4329A1:				; CODE XREF: sub_4322D0+69Bj
cmp	word ptr [esi],	0D1h
jnz	short loc_4329DC
lea	eax, [eax+eax*4]
push	offset byte_7BA5FE8		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4329DC:				; CODE XREF: sub_4322D0+6D6j
mov	cx, [esi]
cmp	cx, 0C0h
jl	loc_432A91
cmp	cx, 0C2h
jg	loc_432A91
lea	eax, [eax+eax*4]
lea	edi, [edi+edi+0Ch]
push	edi
push	offset byte_7BA6114		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
push	edi
push	offset byte_7BA6240		; char *
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
push	offset byte_7BA636C		; char *
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 20h
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432A91:				; CODE XREF: sub_4322D0+714j
					; sub_4322D0+71Fj
mov	cl, [esi+1Ah]
test	cl, cl
jz	loc_432B4F
mov	dx, [esi]
cmp	dx, 0E0h
jl	short loc_432AAD
cmp	dx, 0E8h
jle	short loc_432B14

loc_432AAD:				; CODE XREF: sub_4322D0+7D4j
cmp	dx, 47h
jz	short loc_432B14
cmp	dx, 4Fh
jz	short loc_432B14
cmp	dx, 0D0h
jl	short loc_432AE3
cmp	dx, 0D7h
jg	short loc_432AE3
lea	eax, [eax+eax*4]
and	ecx, 0FFh
push	ecx
push	offset byte_7B80EF0
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx
jmp	short loc_432B2E
; ---------------------------------------------------------------------------

loc_432AE3:				; CODE XREF: sub_4322D0+7EEj
					; sub_4322D0+7F5j
cmp	dx, 0DAh
jz	short loc_432AF8
cmp	dx, 0C0h
jl	short loc_432B4F
cmp	dx, 0C2h
jg	short loc_432B4F

loc_432AF8:				; CODE XREF: sub_4322D0+818j
lea	eax, [eax+eax*4]
and	ecx, 0FFh
push	ecx
push	offset byte_7B8101C
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax
jmp	short loc_432B2E
; ---------------------------------------------------------------------------

loc_432B14:				; CODE XREF: sub_4322D0+7DBj
					; sub_4322D0+7E1j ...
and	ecx, 0FFh
lea	eax, [eax+eax*4]
push	ecx
push	offset byte_7B80DC4		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *

loc_432B2E:				; CODE XREF: sub_4322D0+811j
					; sub_4322D0+842j
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432B4F:				; CODE XREF: sub_4322D0+7C6j
					; sub_4322D0+81Fj ...
mov	ecx, [esp+78h+arg_8]
mov	ebx, [esp+78h+var_68]
mov	edi, offset byte_7B7F528
lea	ebp, [ecx+33h]

loc_432B62:				; CODE XREF: sub_4322D0+8E0j
cmp	byte ptr [ebp+0], 0
jz	short loc_432BA3
lea	eax, [eax+eax*4]
lea	edx, [ebx+1]
push	edx
push	edi
lea	eax, [eax+eax*4]
push	offset byte_7B81148		; char *
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
xor	ecx, ecx
add	esp, 10h
mov	dword ptr dword_7CAFFC4[eax*4], ecx
mov	dword ptr dword_7CC6378[eax*4], ecx
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432BA3:				; CODE XREF: sub_4322D0+896j
add	edi, 12Ch
inc	ebp
cmp	edi, offset byte_7B7F9D8
jl	short loc_432B62
mov	cx, [esi+1Ch]
mov	ebp, 2
test	cx, cx
jz	loc_432C66
lea	eax, [eax+eax*4]
and	ecx, 0FFFFh
push	ecx
push	offset byte_7B81274		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	ecx, dword ptr equNewData570h_7B786CC
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dx, [ecx+14h]
cmp	dx, [esi+1Ch]
jnb	short loc_432C50
xor	edi, edi
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
xor	edx, edx
mov	dword ptr dword_7CC88D4, eax
mov	dx, [ecx+14h]
xor	ecx, ecx
mov	cx, [esi+1Ch]
lea	eax, [eax+eax*4]
sub	ecx, edx
lea	edx, [eax+eax*4]
push	ecx
push	offset byte_7B813A0		; char *
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
jmp	short loc_432C60
; ---------------------------------------------------------------------------

loc_432C50:				; CODE XREF: sub_4322D0+929j
xor	ecx, ecx
mov	dword ptr dword_7CAFFC4[eax*4], ecx
mov	dword ptr dword_7CC6378[eax*4], ecx

loc_432C60:				; CODE XREF: sub_4322D0+97Ej
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432C66:				; CODE XREF: sub_4322D0+8EEj
mov	cx, [esi+1Eh]
test	cx, cx
jz	loc_432D1D
and	ecx, 0FFFFh
lea	eax, [eax+eax*4]
push	ecx
push	offset byte_7B814CC		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	ecx, dword ptr equNewData570h_7B786CC
add	esp, 0Ch
mov	ax, [ecx+16h]
cmp	ax, [esi+1Eh]
mov	eax, dword ptr dword_7CC88D4
jnb	short loc_432D05
xor	edi, edi
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
xor	edx, edx
mov	dword ptr dword_7CC88D4, eax
mov	dx, [ecx+16h]
xor	ecx, ecx
mov	cx, [esi+1Eh]
lea	eax, [eax+eax*4]
sub	ecx, edx
lea	edx, [eax+eax*4]
push	ecx
push	offset byte_7B813A0		; char *
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
mov	dword ptr dword_7CC88D4, eax
jmp	short loc_432D1F
; ---------------------------------------------------------------------------

loc_432D05:				; CODE XREF: sub_4322D0+9D8j
xor	edi, edi
mov	dword ptr dword_7CAFFC4[eax*4], edi
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
mov	dword ptr dword_7CC88D4, eax
jmp	short loc_432D1F
; ---------------------------------------------------------------------------

loc_432D1D:				; CODE XREF: sub_4322D0+99Dj
xor	edi, edi

loc_432D1F:				; CODE XREF: sub_4322D0+A33j
					; sub_4322D0+A4Bj
mov	cx, [esi+22h]
cmp	cx, di
jz	loc_432DC3
and	ecx, 0FFFFh
lea	eax, [eax+eax*4]
push	ecx
push	offset byte_7B815F8		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	ecx, dword ptr equNewData570h_7B786CC
add	esp, 0Ch
mov	ax, [ecx+0Eh]
cmp	ax, [esi+22h]
mov	eax, dword ptr dword_7CC88D4
jnb	short loc_432DAF
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
xor	edx, edx
mov	dword ptr dword_7CC88D4, eax
mov	dx, [ecx+0Eh]
xor	ecx, ecx
lea	eax, [eax+eax*4]
mov	cx, [esi+22h]
sub	ecx, edx
lea	edx, [eax+eax*4]
push	ecx
push	offset byte_7B813A0		; char *
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
jmp	short loc_432DB6
; ---------------------------------------------------------------------------

loc_432DAF:				; CODE XREF: sub_4322D0+A91j
mov	dword ptr dword_7CAFFC4[eax*4], edi

loc_432DB6:				; CODE XREF: sub_4322D0+ADDj
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432DC3:				; CODE XREF: sub_4322D0+A56j
cmp	word ptr [esi],	0CBh
jnz	loc_432E6D
xor	edi, edi
cmp	ebx, 5				; switch 6 cases
ja	short loc_432E04		; jumptable 00432DD5 default case
jmp	ds:off_433358[ebx*4]		; switch jump
; ---------------------------------------------------------------------------

loc_432DDC:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 1Eh			; jumptable 00432DD5 case 0
jmp	short loc_432E04		; jumptable 00432DD5 default case
; ---------------------------------------------------------------------------

loc_432DE3:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 3Ch			; jumptable 00432DD5 case 1
jmp	short loc_432E04		; jumptable 00432DD5 default case
; ---------------------------------------------------------------------------

loc_432DEA:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 5Ah			; jumptable 00432DD5 case 2
jmp	short loc_432E04		; jumptable 00432DD5 default case
; ---------------------------------------------------------------------------

loc_432DF1:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 82h			; jumptable 00432DD5 case 3
jmp	short loc_432E04		; jumptable 00432DD5 default case
; ---------------------------------------------------------------------------

loc_432DF8:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 0AAh			; jumptable 00432DD5 case 4
jmp	short loc_432E04		; jumptable 00432DD5 default case
; ---------------------------------------------------------------------------

loc_432DFF:				; CODE XREF: sub_4322D0+B05j
					; DATA XREF: .text:off_433358o
mov	edi, 0D2h			; jumptable 00432DD5 case 5

loc_432E04:				; CODE XREF: sub_4322D0+B03j
					; sub_4322D0+B11j ...
lea	eax, [eax+eax*4]		; jumptable 00432DD5 default case
push	edi
push	offset byte_7B81724		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	ecx, dword ptr equNewData570h_7B786CC
xor	eax, eax
add	esp, 0Ch
mov	ax, [ecx+1Ah]
cmp	eax, edi
mov	eax, dword ptr dword_7CC88D4
jge	short loc_432E58
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], 0
inc	eax
xor	edx, edx
mov	dword ptr dword_7CC88D4, eax
mov	dx, [ecx+1Ah]
sub	edi, edx
push	edi
jmp	short loc_432ED4
; ---------------------------------------------------------------------------

loc_432E58:				; CODE XREF: sub_4322D0+B63j
xor	ecx, ecx
mov	dword ptr dword_7CAFFC4[eax*4], ecx
mov	dword ptr dword_7CC6378[eax*4], ecx
jmp	loc_432F16
; ---------------------------------------------------------------------------

loc_432E6D:				; CODE XREF: sub_4322D0+AF8j
mov	cx, [esi+20h]
cmp	cx, di
jz	loc_432F1C
lea	eax, [eax+eax*4]
and	ecx, 0FFFFh
push	ecx
push	offset byte_7B81724		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	ecx, dword ptr equNewData570h_7B786CC
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dx, [ecx+1Ah]
cmp	dx, [esi+20h]
jnb	short loc_432F08
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], edi
inc	eax
xor	edx, edx
xor	edi, edi
mov	dword ptr dword_7CC88D4, eax
mov	dx, [esi+20h]
mov	di, [ecx+1Ah]
sub	edx, edi
push	edx

loc_432ED4:				; CODE XREF: sub_4322D0+B86j
lea	eax, [eax+eax*4]
push	offset byte_7B813A0		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], 0
jmp	short loc_432F16
; ---------------------------------------------------------------------------

loc_432F08:				; CODE XREF: sub_4322D0+BDFj
mov	dword ptr dword_7CAFFC4[eax*4], edi
mov	dword ptr dword_7CC6378[eax*4], edi

loc_432F16:				; CODE XREF: sub_4322D0+B98j
					; sub_4322D0+C36j
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_432F1C:				; CODE XREF: sub_4322D0+BA4j
mov	edx, [esp+78h+arg_8]
push	edx
call	sub_4318F0
mov	ax, [esi]
add	esp, 4
cmp	ax, 0B0h
jl	short loc_432FB0
cmp	ax, 0C0h
jge	short loc_432FB0
cmp	ebx, 5
jl	short loc_432FB0
mov	eax, dword ptr dword_7CC88D4
push	offset asc_47CE34		; "\n"
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	ecx, dword ptr dword_7CC88D8
inc	eax
inc	ecx
mov	dword ptr dword_7CC88D4, eax
push	offset byte_7B81850		; char *
lea	eax, [eax+eax*4]
mov	dword ptr dword_7CC88D8, ecx
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	ebp, 1
add	esp, 10h
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax
jmp	short loc_432FBA
; ---------------------------------------------------------------------------

loc_432FB0:				; CODE XREF: sub_4322D0+C63j
					; sub_4322D0+C69j ...
mov	eax, dword ptr dword_7CC88D4
mov	ebp, 1

loc_432FBA:				; CODE XREF: sub_4322D0+CDEj
mov	cx, [esi]
cmp	cx, 0A0h
jl	short loc_433034
cmp	cx, 0B0h
jge	short loc_433034
cmp	ebx, 5
jl	short loc_433034
lea	eax, [eax+eax*4]
push	offset asc_47CE34		; "\n"
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	edx, dword ptr dword_7CC88D8
inc	eax
inc	edx
mov	dword ptr dword_7CC88D4, eax
push	offset byte_7B829E4		; char *
lea	eax, [eax+eax*4]
mov	dword ptr dword_7CC88D8, edx
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 10h
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_433034:				; CODE XREF: sub_4322D0+CF2j
					; sub_4322D0+CF9j ...
mov	cx, [esi]
cmp	cx, 50h
jl	short loc_4330B3
cmp	cx, 60h
jge	short loc_4330B3
lea	eax, [eax+eax*4]
push	offset asc_47CE34		; "\n"
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
mov	edi, dword ptr dword_7CC88D8
inc	eax
inc	edi
xor	ecx, ecx
mov	dword ptr dword_7CC88D4, eax
mov	dword ptr dword_7CC88D8, edi
mov	cx, [esi+0Ch]
lea	eax, [eax+eax*4]
shr	ecx, 1
lea	eax, [eax+eax*4]
lea	edx, [ecx+ebx*2]
push	edx
lea	ecx, byte_7CAF3C8[eax*4]
push	offset byte_7B8197C		; char *
push	ecx				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 14h
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4330B3:				; CODE XREF: sub_4322D0+D6Bj
					; sub_4322D0+D71j
mov	cl, [esi+24h]
test	cl, cl
jbe	short loc_4330DA
lea	eax, [eax+eax*4]
push	offset asc_47CE34		; "\n"
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 8

loc_4330DA:				; CODE XREF: sub_4322D0+DE8j
mov	edx, dword ptr dword_7CC88D8
inc	eax
inc	edx
mov	dword ptr dword_7CC88D4, eax
mov	dword ptr dword_7CC88D8, edx
mov	cl, [esi+24h]
xor	edi, edi
test	cl, cl
jbe	loc_4332C1
mov	bl, 40h

loc_4330FC:				; CODE XREF: sub_4322D0+FEBj
xor	ecx, ecx
mov	cl, [esi+edi+25h]
add	ecx, 0FFFFFFEEh			; switch 48 cases
cmp	ecx, 2Fh
ja	loc_433247			; jumptable 00433116 default case
xor	edx, edx
mov	dl, ds:byte_4333A8[ecx]
jmp	ds:off_433370[edx*4]		; switch jump
; ---------------------------------------------------------------------------

loc_43311D:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
lea	eax, [eax+eax*4]		; jumptable 00433116 case 18
push	offset byte_7B81AA8		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433242
; ---------------------------------------------------------------------------

loc_43313D:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
push	offset byte_7B81BD4		; jumptable 00433116 case 19
jmp	loc_4331D0
; ---------------------------------------------------------------------------

loc_433147:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
lea	eax, [eax+eax*4]		; jumptable 00433116 case 20
push	offset byte_7B81D00		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433242
; ---------------------------------------------------------------------------

loc_433167:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
lea	eax, [eax+eax*4]		; jumptable 00433116 case 21
push	offset byte_7B81E2C		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433242
; ---------------------------------------------------------------------------

loc_433187:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
push	offset byte_7B81F58		; jumptable 00433116 case 22
jmp	short loc_4331D0
; ---------------------------------------------------------------------------

loc_43318E:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
lea	eax, [eax+eax*4]		; jumptable 00433116 case 23
push	offset byte_7B82084		; char *
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433242
; ---------------------------------------------------------------------------

loc_4331AE:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
lea	eax, [eax+eax*4]		; jumptable 00433116 case 24
push	offset byte_7B821B0		; char *
lea	eax, [eax+eax*4]
lea	ecx, byte_7CAF3C8[eax*4]
push	ecx				; char *
call	_sprintf
add	esp, 8
jmp	short loc_433242
; ---------------------------------------------------------------------------

loc_4331CB:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
push	offset byte_7B822DC		; jumptable 00433116 case 64

loc_4331D0:				; CODE XREF: sub_4322D0+E72j
					; sub_4322D0+EBCj
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
add	esp, 8
jmp	short loc_433242
; ---------------------------------------------------------------------------

loc_4331E8:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
xor	ecx, ecx			; jumptable 00433116 case 60
mov	cl, [edi+esi+2Dh]
push	ecx
push	offset byte_7B82408
jmp	short loc_43322C
; ---------------------------------------------------------------------------

loc_4331F6:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
xor	ecx, ecx			; jumptable 00433116 case 61
mov	cl, [edi+esi+2Dh]
push	ecx
push	offset byte_7B82534
jmp	short loc_43322C
; ---------------------------------------------------------------------------

loc_433204:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
xor	ecx, ecx			; jumptable 00433116 case 62
mov	cl, [edi+esi+2Dh]
push	ecx
push	offset byte_7B82660
jmp	short loc_43322C
; ---------------------------------------------------------------------------

loc_433212:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
xor	ecx, ecx			; jumptable 00433116 case 63
mov	cl, [edi+esi+2Dh]
push	ecx
push	offset byte_7B8278C
jmp	short loc_43322C
; ---------------------------------------------------------------------------

loc_433220:				; CODE XREF: sub_4322D0+E46j
					; DATA XREF: .text:off_433370o
xor	ecx, ecx			; jumptable 00433116 case 65
mov	cl, [edi+esi+2Dh]
push	ecx
push	offset byte_7B828B8		; char *

loc_43322C:				; CODE XREF: sub_4322D0+F24j
					; sub_4322D0+F32j ...
lea	eax, [eax+eax*4]
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
add	esp, 0Ch

loc_433242:				; CODE XREF: sub_4322D0+E68j
					; sub_4322D0+E92j ...
mov	eax, dword ptr dword_7CC88D4

loc_433247:				; CODE XREF: sub_4322D0+E38j
					; sub_4322D0+E46j
					; DATA XREF: ...
cmp	[esi+edi+25h], bl		; jumptable 00433116 default case
jnz	short loc_43325E
mov	cx, [esi]
cmp	cx, 0C0h
jl	short loc_43325E
cmp	cx, 0C2h
jle	short loc_433272

loc_43325E:				; CODE XREF: sub_4322D0+F7Bj
					; sub_4322D0+F85j
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_433272:				; CODE XREF: sub_4322D0+F8Cj
cmp	[esi+edi+25h], bl
jnz	short loc_4332B3
lea	eax, [eax+eax*4]
xor	ecx, ecx
mov	cl, [edi+esi+2Dh]
lea	edx, [eax+eax*4]
push	ecx
push	offset byte_7B82B10		; char *
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr dword_7CC88D4
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[eax*4], ebp
mov	dword ptr dword_7CC6378[eax*4], ebp
inc	eax
mov	dword ptr dword_7CC88D4, eax

loc_4332B3:				; CODE XREF: sub_4322D0+FA6j
xor	ecx, ecx
inc	edi
mov	cl, [esi+24h]
cmp	edi, ecx
jl	loc_4330FC

loc_4332C1:				; CODE XREF: sub_4322D0+E24j
lea	eax, [eax+eax*4]
push	offset asc_47CE34		; "\n"
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	esi, dword ptr dword_7CC88D4
mov	edx, dword ptr dword_7CC88D8
mov	eax, dword ptr g_fontHeight_7BA8530
add	esp, 8
inc	esi
inc	edx
mov	ecx, esi
mov	dword ptr dword_7CC88D8, edx
sub	ecx, edx
mov	dword ptr dword_7CC88D4, esi
imul	ecx, eax
imul	eax, edx
cdq
sub	eax, edx
xor	edx, edx
sar	eax, 1
add	ecx, eax
lea	eax, [ecx+ecx*2]
lea	eax, [eax+eax*4]
shl	eax, 5
div	dword ptr g_wndWidth+4
mov	edx, [esp+78h+arg_4]
mov	ecx, edx
sub	ecx, eax
jns	short loc_43333C
mov	ecx, [esp+78h+arg_8]
xor	eax, eax
mov	al, [ecx+21h]
lea	eax, [eax+eax*4]
lea	ecx, [edx+eax*4]

loc_43333C:				; CODE XREF: sub_4322D0+1058j
push	0
push	esi
push	ecx
mov	ecx, [esp+84h+arg_0]
push	ecx
call	sub_431750
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 68h
retn
align 4
; ---------------------------------------------------------------------------
off_433358 dd offset loc_432DDC		; DATA XREF: sub_4322D0+B05r
dd offset loc_432DE3			; jump table for switch	statement
dd offset loc_432DEA
dd offset loc_432DF1
dd offset loc_432DF8
dd offset loc_432DFF
off_433370 dd offset loc_43311D		; DATA XREF: sub_4322D0+E46r
dd offset loc_43313D			; jump table for switch	statement
dd offset loc_433147
dd offset loc_433167
dd offset loc_433187
dd offset loc_43318E
dd offset loc_4331AE
dd offset loc_4331E8
dd offset loc_4331F6
dd offset loc_433204
dd offset loc_433212
dd offset loc_4331CB
dd offset loc_433220
dd offset loc_433247
byte_4333A8 db	    0,	   1,	  2,	 3 ; DATA XREF:	sub_4322D0+E40r
db	4,     5,     6,   0Dh		; indirect table for switch statement
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,   0Dh,   0Dh
db    0Dh,   0Dh,     7,     8
db	9,   0Ah,   0Bh,   0Ch
sub_4322D0 endp

align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4333E0 proc	near			; CODE XREF: sub_43BD90+4Bp

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, dword ptr equNewData570h_7B786CC
mov	edx, [esp+arg_8]
xor	eax, eax
push	ebx
mov	al, [ecx+edx+45h]
mov	ecx, dword ptr newData900h1_7B7BCE4
push	esi
push	edi
lea	eax, [eax+eax*8]
push	offset asc_47CE34		; "\n"
push	offset byte_7CAF3C8		; char *
lea	edi, [ecx+eax*4]
call	_sprintf
push	edi
push	offset aS_0			; "%s"
push	offset byte_7CAF42C		; char *
call	_sprintf
mov	eax, 1
push	offset asc_47CE34		; "\n"
push	offset byte_7CAF490		; char *
mov	dword ptr dword_7CAFFC8, eax
mov	dword ptr dword_7CC637C, eax
call	_sprintf
mov	edx, dword ptr dword_79DBE88
xor	ebx, ebx
add	esp, 1Ch
mov	esi, 3
cmp	[edx+178h], bl
jnz	short loc_43349E
mov	ecx, dword ptr equNewData570h_7B786CC
xor	eax, eax
mov	al, [edi+21h]
push	ebp
mov	edx, eax
mov	ebp, eax
shr	edx, 1
xor	esi, esi
add	ebp, edx
mov	si, [ecx+36h]
xor	edx, edx
mov	dx, [ecx+34h]
add	esi, ebp
add	edx, eax
push	esi
push	edx
push	offset byte_7B88420		; char *
push	offset byte_7CAF4F4		; char *
call	_sprintf
add	esp, 10h
mov	dword ptr dword_7CAFFD0, ebx
mov	dword ptr dword_7CC6384, ebx
mov	esi, 4
pop	ebp

loc_43349E:				; CODE XREF: sub_4333E0+72j
mov	eax, dword ptr dword_79DBE88
cmp	byte ptr [eax+178h], 2
jnz	loc_433564
mov	eax, dword ptr equNewData570h_7B786CC
mov	edx, [esp+0Ch+arg_8]
xor	ecx, ecx
mov	cl, [eax+edx+45h]
sub	ecx, 1Ah
jz	short loc_433521
dec	ecx
jz	short loc_4334FF
dec	ecx
jnz	loc_433564
xor	ecx, ecx
mov	cx, [eax+1Ah]
mov	eax, 92492493h
imul	ecx
add	edx, ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
lea	ecx, [edx+eax+3]
lea	eax, [esi+esi*4]
push	ecx
push	offset byte_7B887A4
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax
jmp	short loc_43354D
; ---------------------------------------------------------------------------

loc_4334FF:				; CODE XREF: sub_4333E0+E5j
xor	ecx, ecx
mov	cx, [eax+1Ah]
lea	eax, [esi+esi*4]
shr	ecx, 3
lea	edx, [eax+eax*4]
add	ecx, 2
push	ecx
push	offset byte_7B88678
lea	eax, byte_7CAF3C8[edx*4]
push	eax
jmp	short loc_43354D
; ---------------------------------------------------------------------------

loc_433521:				; CODE XREF: sub_4333E0+E2j
xor	ecx, ecx
mov	cx, [eax+1Ah]
mov	eax, 66666667h
imul	ecx
sar	edx, 1
mov	ecx, edx
lea	eax, [esi+esi*4]
shr	ecx, 1Fh
lea	eax, [eax+eax*4]
lea	edx, [edx+ecx+5]
push	edx
lea	ecx, byte_7CAF3C8[eax*4]
push	offset byte_7B8854C		; char *
push	ecx				; char *

loc_43354D:				; CODE XREF: sub_4333E0+11Dj
					; sub_4333E0+13Fj
call	_sprintf
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[esi*4], ebx
mov	dword ptr dword_7CC6378[esi*4], ebx
inc	esi

loc_433564:				; CODE XREF: sub_4333E0+CAj
					; sub_4333E0+E8j
mov	al, [edi+23h]
cmp	al, bl
jz	short loc_43359B
and	eax, 0FFh
push	eax
lea	eax, [esi+esi*4]
push	offset byte_7B888D0		; char *
lea	edx, [eax+eax*4]
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
add	esp, 0Ch
mov	dword ptr dword_7CAFFC4[esi*4], ebx
mov	dword ptr dword_7CC6378[esi*4], ebx
inc	esi

loc_43359B:				; CODE XREF: sub_4333E0+189j
lea	eax, [esi+esi*4]
xor	ecx, ecx
mov	cl, [edi+22h]
lea	edx, [eax+eax*4]
push	ecx
push	offset byte_7B889FC		; char *
lea	eax, byte_7CAF3C8[edx*4]
push	eax				; char *
call	_sprintf
mov	dword ptr dword_7CAFFC4[esi*4], ebx
mov	dword ptr dword_7CC6378[esi*4], ebx
inc	esi
push	offset asc_47CE34		; "\n"
lea	eax, [esi+esi*4]
lea	ecx, [eax+eax*4]
lea	edx, byte_7CAF3C8[ecx*4]
push	edx				; char *
call	_sprintf
mov	ecx, [esp+20h+arg_4]
inc	esi
mov	eax, 2
push	ebx
sub	eax, esi
push	esi
lea	eax, [eax+eax*2]
lea	edx, [ecx+eax*4]
mov	eax, [esp+28h+arg_0]
push	edx
push	eax
call	sub_431750
add	esp, 24h
pop	edi
pop	esi
pop	ebx
retn
sub_4333E0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433610 proc	near			; CODE XREF: sub_433A60+11Ep
					; sub_433A60+15Ep

sz= dword ptr	-3Ch	;tagSIZE
String=	byte ptr -34h
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, g_params
mov	ecx, dword ptr g_hdc2
sub	esp, 3Ch
push	ebx
mov	ebx, [esp+40h+arg_8]
push	ebp
push	esi
mov	esi, ebx
push	edi
mov	edi, ds:SelectObject
push	eax				; hfont2_54CA6A4
sar	esi, 3
push	ecx				; g_hdc2
and	esi, 0Fh
call	edi ; SelectObject
mov	ebp, [esp+4Ch+arg_4]
mov	ax, [ebp+2]
cmp	ax, 24Dh
jnz	short loc_43368E
push	3DCCCCCDh			; blue
push	3F4CCCCDh			; green
push	3F800000h			; red
call	ds:glColor3f
movsx	eax, word ptr [ebp+2]
mov	ecx, dword ptr newData3700h1_7BA8518
sub	eax, 15Eh
push	ebx
lea	edx, [eax+eax*4]
lea	eax, [eax+edx*2]
lea	edx, [ecx+eax*4]
add	eax, edx
push	eax
push	offset aSD			; "%s %d"

loc_43367C:				; CODE XREF: sub_433610+169j
lea	eax, [esp+58h+String]
push	eax				; char *
call	_sprintf
add	esp, 10h
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_43368E:				; CODE XREF: sub_433610+34j
cmp	ax, 24Bh
jz	loc_4338F5
cmp	ax, 24Ch
jz	loc_4338F5
cmp	ax, 22Dh
jz	loc_4338F5
cmp	ax, 24Ah
jnz	short loc_433706
sub	esi, 0
jz	short loc_4336EF
dec	esi
jz	short loc_4336D8
dec	esi
jnz	loc_433946
lea	ecx, [esp+4Ch+String]
push	offset byte_7B836C8		; char *
push	ecx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_4336D8:				; CODE XREF: sub_433610+A8j
lea	edx, [esp+4Ch+String]
push	offset byte_7B83344		; char *
push	edx				; char *
call	_sprintf
add	esp, 8
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_4336EF:				; CODE XREF: sub_433610+A5j
lea	eax, [esp+4Ch+String]
push	offset byte_7B83218		; char *
push	eax				; char *
call	_sprintf
add	esp, 8
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_433706:				; CODE XREF: sub_433610+A0j
cmp	ax, 229h
jnz	short loc_433739
mov	edx, dword ptr newData900h1_7B7BCE4
lea	ecx, [esi+esi*8+10Eh]
push	offset byte_7B83470
lea	eax, [edx+ecx*4]
lea	ecx, [esp+50h+String]
push	eax
push	offset aSS_1			; "%s %s"
push	ecx				; char *
call	_sprintf
add	esp, 10h
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_433739:				; CODE XREF: sub_433610+FAj
cmp	ax, 238h
jnz	short loc_43377E
mov	esi, dword ptr dword_47D030[esi*4]
xor	ecx, ecx
mov	eax, offset byte_7B786D8

loc_43374D:				; CODE XREF: sub_433610+14Ej
xor	edx, edx
mov	dl, [eax]
cmp	esi, edx
jz	short loc_433765
add	eax, 36h
inc	ecx
cmp	eax, offset newData384h_7B7BCD8
jl	short loc_43374D
jmp	loc_433946
; ---------------------------------------------------------------------------

loc_433765:				; CODE XREF: sub_433610+143j
imul	ecx, 36h
add	ecx, offset byte_7B786D9
push	offset byte_7B8359C
push	ecx
push	offset aSS_1			; "%s %s"
jmp	loc_43367C
; ---------------------------------------------------------------------------

loc_43377E:				; CODE XREF: sub_433610+12Dj
cmp	esi, 7
jl	short loc_433794
push	3DCCCCCDh
push	3F4CCCCDh
push	3F800000h
jmp	short loc_4337EF
; ---------------------------------------------------------------------------

loc_433794:				; CODE XREF: sub_433610+171j
test	bl, 87h
jnz	short loc_4337E0
test	esi, esi
jnz	short loc_4337B4
push	3F333333h			; blue
push	3F333333h			; green
push	3F333333h			; red
call	ds:glColor3f
jmp	short loc_4337F9
; ---------------------------------------------------------------------------

loc_4337B4:				; CODE XREF: sub_433610+18Bj
cmp	esi, 3
jge	short loc_4337CA
push	3F666666h
push	3F666666h
push	3F666666h
jmp	short loc_4337EF
; ---------------------------------------------------------------------------

loc_4337CA:				; CODE XREF: sub_433610+1A7j
cmp	esi, 5
jge	short loc_4337E0
push	3E4CCCCDh
push	3F000000h
push	3F800000h
jmp	short loc_4337EF
; ---------------------------------------------------------------------------

loc_4337E0:				; CODE XREF: sub_433610+187j
					; sub_433610+1BDj
push	3F800000h			; blue
push	3F333333h			; green
push	3ECCCCCDh			; red

loc_4337EF:				; CODE XREF: sub_433610+182j
					; sub_433610+1B8j ...
call	ds:glColor3f
test	esi, esi
jnz	short loc_433828

loc_4337F9:				; CODE XREF: sub_433610+1A2j
movsx	eax, word ptr [ebp+2]
mov	edx, dword ptr newData3700h1_7BA8518
sub	eax, 15Eh
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
lea	edx, [esp+4Ch+String]
add	eax, ecx
push	eax
push	offset aS_0			; "%s"
push	edx				; char *
call	_sprintf
add	esp, 0Ch
jmp	short loc_433856
; ---------------------------------------------------------------------------

loc_433828:				; CODE XREF: sub_433610+1E7j
movsx	eax, word ptr [ebp+2]
mov	edx, dword ptr newData3700h1_7BA8518
sub	eax, 15Eh
push	esi
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
lea	edx, [esp+50h+String]
add	eax, ecx
push	eax
push	offset aSD_0			; "%s +%d"
push	edx				; char *
call	_sprintf
add	esp, 10h

loc_433856:				; CODE XREF: sub_433610+216j
test	bl, 80h
jz	short loc_433889
mov	edi, offset byte_7B88B28
or	ecx, 0FFFFFFFFh
xor	eax, eax
lea	edx, [esp+4Ch+String]
repne scasb
not	ecx
sub	edi, ecx
mov	esi, edi
mov	edi, edx
mov	edx, ecx
or	ecx, 0FFFFFFFFh
repne scasb
mov	ecx, edx
dec	edi
shr	ecx, 2
rep movsd
mov	ecx, edx
and	ecx, 3
rep movsb

loc_433889:				; CODE XREF: sub_433610+249j
test	bl, 3
jz	short loc_4338BC
mov	edi, offset byte_7B88C54
or	ecx, 0FFFFFFFFh
xor	eax, eax
lea	edx, [esp+4Ch+String]
repne scasb
not	ecx
sub	edi, ecx
mov	esi, edi
mov	edi, edx
mov	edx, ecx
or	ecx, 0FFFFFFFFh
repne scasb
mov	ecx, edx
dec	edi
shr	ecx, 2
rep movsd
mov	ecx, edx
and	ecx, 3
rep movsb

loc_4338BC:				; CODE XREF: sub_433610+27Cj
test	bl, 4
jz	loc_433946
mov	edi, offset byte_7B88D80
or	ecx, 0FFFFFFFFh
xor	eax, eax
lea	edx, [esp+4Ch+String]
repne scasb
not	ecx
sub	edi, ecx
mov	esi, edi
mov	ebx, ecx
mov	edi, edx
or	ecx, 0FFFFFFFFh
repne scasb
mov	ecx, ebx
dec	edi
shr	ecx, 2
rep movsd
mov	ecx, ebx
and	ecx, 3
rep movsb
jmp	short loc_433946
; ---------------------------------------------------------------------------

loc_4338F5:				; CODE XREF: sub_433610+82j
					; sub_433610+8Cj ...
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	edi ; SelectObject
push	3DCCCCCDh			; blue
push	3F4CCCCDh			; green
push	3F800000h			; red
call	ds:glColor3f
movsx	eax, word ptr [ebp+2]
mov	ecx, dword ptr newData3700h1_7BA8518
sub	eax, 15Eh
lea	edx, [eax+eax*4]
lea	eax, [eax+edx*2]
lea	edx, [ecx+eax*4]
add	eax, edx
push	eax
lea	eax, [esp+50h+String]
push	offset aS_0			; "%s"
push	eax				; char *
call	_sprintf
add	esp, 0Ch

loc_433946:				; CODE XREF: sub_433610+79j
					; sub_433610+ABj ...
lea	ecx, [esp+4Ch+sz]
lea	edx, [esp+4Ch+String]
push	ecx				; lpsz
push	edx				; lpString
call	ds:lstrlenA
mov	ecx, dword ptr g_hdc2
push	eax				; c
lea	eax, [esp+54h+String]
push	eax				; lpString
push	ecx				; g_hdc2
call	ds:GetTextExtentPointA
mov	al, [esp+4Ch+arg_C]
push	3				; int
push	0				; int
lea	edx, [esp+54h+String]
test	al, al
push	0				; x
push	edx				; lpString
jnz	short loc_4339B5
mov	eax, dword ptr dword_81C17B0
mov	ecx, dword ptr dword_81C17B4
add	eax, 0FFFFFFF1h
push	eax				; int
mov	eax, [esp+60h+sz+tagSIZE._cx]
cdq
sub	eax, edx
xor	edx, edx
sar	eax, 1
lea	eax, [eax+eax*4]
shl	eax, 7
div	dword ptr g_wndWidth
sub	ecx, eax
push	ecx				; int
call	sub_4273F0
add	esp, 18h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
; ---------------------------------------------------------------------------

loc_4339B5:				; CODE XREF: sub_433610+36Aj
movsx	eax, word ptr [ebp+5Ah]
sub	eax, 0Fh
push	eax				; int
mov	eax, [esp+60h+sz+tagSIZE._cx]
cdq
sub	eax, edx
xor	edx, edx
sar	eax, 1
movsx	ecx, word ptr [ebp+58h]
lea	eax, [eax+eax*4]
shl	eax, 7
div	dword ptr g_wndWidth
sub	ecx, eax
push	ecx				; int
call	sub_4273F0
add	esp, 18h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 3Ch
retn
sub_433610 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4339F0 proc	near			; CODE XREF: sub_42C5F0:loc_42C714p
					; sub_42E970+65p ...
mov	al, byte_7CC88BF
test	al, al
mov	al, byte_7CC88BE
jz	short loc_433A2C
test	al, al
jnz	short loc_433A26
mov	al, byte_7CC88C0
test	al, al
jnz	short loc_433A26
mov	al, byte_7CC88C1
test	al, al
jnz	short loc_433A26
mov	al, byte_7CC88C2
test	al, al
jnz	short loc_433A26
mov	al, byte_7CC88C3
test	al, al
jz	short loc_433A50

loc_433A26:				; CODE XREF: sub_4339F0+10j
					; sub_4339F0+19j ...
mov	eax, 104h
retn
; ---------------------------------------------------------------------------

loc_433A2C:				; CODE XREF: sub_4339F0+Cj
test	al, al
jnz	short loc_433A50
mov	al, byte_7CC88BD
test	al, al
jnz	short loc_433A50
mov	al, byte_7CC88BC
test	al, al
jnz	short loc_433A50
mov	al, byte_7CC88C4
test	al, al
mov	eax, 280h
jz	short locret_433A55

loc_433A50:				; CODE XREF: sub_4339F0+34j
					; sub_4339F0+3Ej ...
mov	eax, 1C2h

locret_433A55:				; CODE XREF: sub_4339F0+5Ej
retn
sub_4339F0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433A60 proc	near			; CODE XREF: sub_451320+5p

sz= dword ptr	-8	;tagSIZE

sub	esp, 8
mov	byte_7C41CEE, 1
push	esi
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ds:glColor3f
call	sub_44E1C0
mov	ecx, dword ptr dword_47CE94
mov	eax, dword ptr dword_47CE98
cmp	ecx, 0FFFFFFFFh
jnz	short loc_433AAA
cmp	eax, 0FFFFFFFFh
jnz	short loc_433AAF
mov	eax, dword ptr dword_47CE9C
cmp	eax, 0FFFFFFFFh
jz	loc_433B86
jmp	short loc_433AE7
; ---------------------------------------------------------------------------

loc_433AAA:				; CODE XREF: sub_433A60+33j
cmp	eax, 0FFFFFFFFh
jz	short loc_433ADD

loc_433AAF:				; CODE XREF: sub_433A60+38j
mov	edx, dword ptr newData3ACA0h_79DBE84
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
shl	eax, 5
add	eax, edx

loc_433AC0:				; CODE XREF: sub_433A60+9Cj
push	0FFFFFFFFh
push	0
push	eax
add	eax, 17Ch
push	offset g_Default1
push	eax
call	sub_427FA0
add	esp, 14h
jmp	loc_433B86
; ---------------------------------------------------------------------------

loc_433ADD:				; CODE XREF: sub_433A60+4Dj
mov	eax, dword ptr dword_47CE9C
cmp	eax, 0FFFFFFFFh
jz	short loc_433B61

loc_433AE7:				; CODE XREF: sub_433A60+48j
mov	edx, dword ptr newData3ACA0h_79DBE84
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
shl	eax, 5
add	eax, edx
cmp	byte ptr [eax+78h], 2
jnz	short loc_433AC0
lea	esi, [eax+17Ch]
lea	eax, [esp+0Ch+sz]
push	eax				; lpsz
push	esi				; lpString
call	ds:lstrlenA
mov	ecx, dword ptr g_hdc2
push	eax				; c
push	esi				; lpString
push	ecx				; g_hdc2
call	ds:GetTextExtentPointA
mov	edx, [esp+0Ch+sz+tagSIZE._cx]
push	3				; int
push	0				; int
push	edx				; x
push	esi				; lpString
push	0Ah				; int
mov	dword ptr dword_47CEB4, 0FF000064h
mov	dword ptr dword_47CEAC, 0FFC8E6FFh
call	sub_4339F0
cdq
sub	eax, edx
mov	ecx, eax
mov	eax, [esp+20h+sz+tagSIZE._cx]
cdq
sub	eax, edx
sar	ecx, 1
sar	eax, 1
sub	ecx, eax
push	ecx				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_433B86
; ---------------------------------------------------------------------------

loc_433B61:				; CODE XREF: sub_433A60+85j
lea	eax, ds:0[ecx*8]
push	0
sub	eax, ecx
shl	eax, 6
mov	edx, dword ptr dword_7C41DD0[eax]
lea	eax, byte_7C41E10[eax]
push	edx
push	eax
push	ecx
call	sub_433610
add	esp, 10h

loc_433B86:				; CODE XREF: sub_433A60+42j
					; sub_433A60+78j ...
mov	al, byte ptr g_showGroundItemName
test	al, al
jz	short loc_433BD6
nop
nop
nop
nop
nop
nop
nop
nop
push	edi
xor	edi, edi
mov	esi, offset byte_7C41E10

loc_433B9F:				; CODE XREF: sub_433A60+173j
cmp	byte ptr [esi],	0
jz	short loc_433BC6
mov	al, [esi+150h]
test	al, al
jz	short loc_433BC6
cmp	edi, dword ptr dword_47CE94
jz	short loc_433BC6
mov	edx, [esi-40h]
push	1
push	edx
push	esi
push	edi
call	sub_433610
add	esp, 10h

loc_433BC6:				; CODE XREF: sub_433A60+142j
					; sub_433A60+14Cj ...
add	esi, 1C0h
inc	edi
cmp	esi, offset byte_7CAF410
jl	short loc_433B9F
pop	edi

loc_433BD6:				; CODE XREF: sub_433A60+12Dj
pop	esi
add	esp, 8
retn
sub_433A60 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433BE0 proc	near			; CODE XREF: sub_406D40+15p
					; sub_407C30+141p ...
push	ebx
xor	ebx, ebx
mov	byte_7CC88C0, bl
mov	byte_7CC88C1, bl
mov	byte_7CC88C2, bl
mov	byte_7CC88C3, bl
mov	eax, offset dword_7CC43D0
or	ecx, 0FFFFFFFFh

loc_433C03:				; CODE XREF: sub_433BE0+31j
mov	[eax-38h], cx
mov	[eax], ebx
add	eax, 44h
cmp	eax, offset byte_7CC63B0
jl	short loc_433C03
mov	eax, offset byte_7CC8038

loc_433C18:				; CODE XREF: sub_433BE0+46j
mov	[eax-38h], cx
mov	[eax], ebx
add	eax, 44h
cmp	eax, offset dword_7CC88B8
jl	short loc_433C18
xor	eax, eax

loc_433C2A:				; CODE XREF: sub_433BE0+6Cj
mov	word ptr word_7CC63F0[eax], cx
mov	word ptr word_7CC3B00[eax], cx
mov	dword ptr dword_7CC6428[eax], ebx
mov	dword ptr dword_7CC3B38[eax], ebx
add	eax, 44h
cmp	eax, 880h
jl	short loc_433C2A
push	ebx
push	ebx
push	19h
mov	dword ptr dword_7C41CB8, ebx
call	sub_401570
push	ebx
push	ebx
push	1Ch
call	sub_401570
add	esp, 18h
pop	ebx
retn
sub_433BE0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433C70 proc	near			; CODE XREF: sub_453370:loc_453479p
xor	edx, edx
xor	eax, eax
push	esi
or	ecx, 0FFFFFFFFh

loc_433C78:				; CODE XREF: sub_433C70+2Bj
mov	esi, dword ptr newData570h_7B786D4
add	eax, 44h
cmp	eax, 330h
mov	[eax+esi+1C4h],	cx
mov	esi, dword ptr newData570h_7B786D4
mov	[eax+esi+1FCh],	edx
jl	short loc_433C78
mov	eax, offset dword_7CC6CB0
pop	esi

loc_433CA3:				; CODE XREF: sub_433C70+41j
mov	[eax-38h], cx
mov	[eax], edx
add	eax, 44h
cmp	eax, offset byte_7CC7DB0
jl	short loc_433CA3
mov	eax, offset dword_7CC43D0

loc_433CB8:				; CODE XREF: sub_433C70+56j
mov	[eax-38h], cx
mov	[eax], edx
add	eax, 44h
cmp	eax, offset byte_7CC63B0
jl	short loc_433CB8
mov	eax, offset byte_7CC8038

loc_433CCD:				; CODE XREF: sub_433C70+6Bj
mov	[eax-38h], cx
mov	[eax], edx
add	eax, 44h
cmp	eax, offset dword_7CC88B8
jl	short loc_433CCD
xor	eax, eax

loc_433CDF:				; CODE XREF: sub_433C70+91j
mov	word ptr word_7CC3B00[eax], cx
mov	word ptr word_7CC63F0[eax], cx
mov	dword ptr dword_7CC3B38[eax], edx
mov	dword ptr dword_7CC6428[eax], edx
add	eax, 44h
cmp	eax, 880h
jl	short loc_433CDF
retn
sub_433C70 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433D10 proc	near			; CODE XREF: sub_407FE0+DAp

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

mov	eax, [esp+arg_4]
sub	esp, 8
cmp	eax, 0FFh
push	edi
jz	loc_433DED
mov	edx, dword ptr newData3700h1_7BA8518
lea	ecx, [eax+eax*4]
xor	edi, edi
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
add	eax, ecx
mov	[esp+0Ch+var_8], eax
mov	cl, [eax+21h]
test	cl, cl
jbe	loc_433DED
push	ebx
push	ebp
push	esi

loc_433D48:				; CODE XREF: sub_433D10+D4j
mov	cl, [eax+20h]
xor	esi, esi
test	cl, cl
jbe	loc_433DDC
mov	eax, [esp+18h+arg_0]
mov	ebx, eax
and	ebx, 80000007h
lea	ebp, [eax+edi*8]
jns	short loc_433D6B
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_433D6B:				; CODE XREF: sub_433D10+54j
cdq
and	edx, 7
add	eax, edx
mov	ecx, eax
sar	ecx, 3
mov	[esp+18h+var_4], ecx
jmp	short loc_433D80
; ---------------------------------------------------------------------------

loc_433D7C:				; CODE XREF: sub_433D10+C8j
mov	ecx, [esp+18h+var_4]

loc_433D80:				; CODE XREF: sub_433D10+6Aj
lea	eax, [esi+ebp]
mov	edx, eax
shl	edx, 4
add	edx, eax
test	edi, edi
lea	eax, byte_7CC4398[edx*4]
mov	dx, word ptr [esp+18h+arg_4]
mov	[eax+3Fh], cl
mov	cl, [esp+18h+arg_C]
mov	[eax], dx
mov	[eax+3Eh], bl
mov	[eax+1Ah], cl
jnz	short loc_433DB7
test	esi, esi
jnz	short loc_433DB7
mov	dword ptr [eax+38h], 1
jmp	short loc_433DBE
; ---------------------------------------------------------------------------

loc_433DB7:				; CODE XREF: sub_433D10+98j
					; sub_433D10+9Cj
mov	dword ptr [eax+38h], 0

loc_433DBE:				; CODE XREF: sub_433D10+A5j
mov	edx, [esp+18h+arg_8]
push	edx
push	eax
call	sub_425A10
mov	ecx, [esp+20h+var_8]
xor	eax, eax
add	esp, 8
inc	esi
mov	al, [ecx+20h]
cmp	esi, eax
jl	short loc_433D7C
mov	eax, ecx

loc_433DDC:				; CODE XREF: sub_433D10+3Fj
xor	edx, edx
inc	edi
mov	dl, [eax+21h]
cmp	edi, edx
jl	loc_433D48
pop	esi
pop	ebp
pop	ebx

loc_433DED:				; CODE XREF: sub_433D10+Dj
					; sub_433D10+2Fj
pop	edi
add	esp, 8
retn
sub_433D10 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_433E00 proc	near			; CODE XREF: sub_407EA0+8Ap
					; sub_407FE0+BAp ...

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	byte ptr  1Ch
arg_1C=	byte ptr  20h

sub	esp, 8
push	edi
mov	edi, [esp+0Ch+arg_10]
cmp	edi, 0FFh
jz	loc_4340C9
mov	eax, [esp+0Ch+arg_0]
push	ebx
push	ebp
cmp	eax, offset word_7CC6C78
push	esi
jnz	loc_433FD4
mov	ebx, [esp+18h+arg_C]
cmp	ebx, 0Ch
jge	loc_433EFB
mov	ecx, dword ptr newData570h_7B786D4
mov	eax, ebx
shl	eax, 4
mov	dl, [esp+18h+arg_18]
add	eax, ebx
lea	eax, [ecx+eax*4+208h]
mov	ecx, [esp+18h+arg_14]
push	ecx
push	eax
mov	[eax], di
mov	[eax+1Ah], dl
mov	dword ptr [eax+38h], 1
call	sub_425A10
mov	edx, dword ptr dword_79DBE88
push	edx
call	sub_419240
mov	esi, dword ptr dword_79DBE88
add	esp, 0Ch
cmp	ebx, 8
jnz	loc_4340A0
sub	edi, 0D0h
jz	short loc_433EE0
sub	edi, 2
jnz	loc_4340A0
push	0
lea	edi, [esi+0Ch]
push	0
push	esi
push	edi
push	0C3h
call	sub_442B00
mov	eax, dword ptr dword_79DBE88
add	esp, 14h
mov	cl, [eax+2DAh]
test	cl, cl
jnz	loc_4340A0
push	0
push	0FFFFFFFFh
push	esi
lea	ecx, [esi+0D8h]
push	1
add	esi, 18h
push	ecx
push	esi
push	edi
push	4BBh
call	sub_41E430
add	esp, 20h
jmp	loc_4340A0
; ---------------------------------------------------------------------------

loc_433EE0:				; CODE XREF: sub_433E00+87j
push	0
push	0
push	esi
add	esi, 0Ch
push	esi
push	22Eh
call	sub_442B00
add	esp, 14h
jmp	loc_4340A0
; ---------------------------------------------------------------------------

loc_433EFB:				; CODE XREF: sub_433E00+2Dj
lea	edx, [edi+edi*4]
lea	eax, [ebx-0Ch]
xor	ebp, ebp
mov	[esp+18h+var_4], eax
lea	ecx, [edi+edx*2]
mov	edx, dword ptr newData3700h1_7BA8518
lea	edx, [edx+ecx*4]
add	ecx, edx
mov	[esp+18h+arg_C], ecx
mov	dl, [ecx+21h]
test	dl, dl
jbe	loc_4340A0

loc_433F24:				; CODE XREF: sub_433E00+1C9j
mov	dl, [ecx+20h]
xor	esi, esi
test	dl, dl
jbe	loc_433FC1
mov	ecx, ebp
mov	ebx, eax
imul	ecx, [esp+18h+arg_4]
add	ecx, eax
and	ebx, 80000007h
mov	[esp+18h+var_8], ecx
jns	short loc_433F4D
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_433F4D:				; CODE XREF: sub_433E00+146j
cdq
and	edx, 7
add	eax, edx
mov	ecx, eax
sar	ecx, 3
mov	[esp+18h+arg_10], ecx
jmp	short loc_433F62
; ---------------------------------------------------------------------------

loc_433F5E:				; CODE XREF: sub_433E00+1B9j
mov	ecx, [esp+18h+arg_10]

loc_433F62:				; CODE XREF: sub_433E00+15Cj
mov	edx, [esp+18h+var_8]
lea	eax, [edx+esi]
mov	edx, eax
shl	edx, 4
add	edx, eax
mov	eax, [esp+18h+arg_0]
test	ebp, ebp
lea	eax, [eax+edx*4]
mov	dl, [esp+18h+arg_18]
mov	[eax], di
mov	[eax+1Ah], dl
mov	[eax+3Eh], bl
mov	[eax+3Fh], cl
jnz	short loc_433F98
test	esi, esi
jnz	short loc_433F98
mov	dword ptr [eax+38h], 1
jmp	short loc_433F9F
; ---------------------------------------------------------------------------

loc_433F98:				; CODE XREF: sub_433E00+189j
					; sub_433E00+18Dj
mov	dword ptr [eax+38h], 0

loc_433F9F:				; CODE XREF: sub_433E00+196j
mov	ecx, [esp+18h+arg_14]
push	ecx
push	eax
call	sub_425A10
mov	eax, [esp+20h+arg_C]
xor	edx, edx
add	esp, 8
inc	esi
mov	dl, [eax+20h]
cmp	esi, edx
jl	short loc_433F5E
mov	ecx, eax
mov	eax, [esp+18h+var_4]

loc_433FC1:				; CODE XREF: sub_433E00+12Bj
xor	edx, edx
inc	ebp
mov	dl, [ecx+21h]
cmp	ebp, edx
jl	loc_433F24
jmp	loc_4340A0
; ---------------------------------------------------------------------------

loc_433FD4:				; CODE XREF: sub_433E00+20j
mov	ecx, dword ptr newData3700h1_7BA8518
lea	eax, [edi+edi*4]
xor	ebp, ebp
lea	eax, [edi+eax*2]
lea	edx, [ecx+eax*4]
mov	cl, [eax+edx+21h]
add	eax, edx
test	cl, cl
mov	[esp+18h+arg_10], eax
jbe	loc_4340A0

loc_433FF7:				; CODE XREF: sub_433E00+29Aj
mov	cl, [eax+20h]
xor	esi, esi
test	cl, cl
jbe	loc_434092
mov	ecx, ebp
mov	eax, [esp+18h+arg_C]
imul	ecx, [esp+18h+arg_4]
mov	ebx, eax
add	ecx, eax
and	ebx, 80000007h
mov	[esp+18h+var_8], ecx
jns	short loc_434024
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_434024:				; CODE XREF: sub_433E00+21Dj
cdq
and	edx, 7
add	eax, edx
mov	ecx, eax
sar	ecx, 3
mov	[esp+18h+var_4], ecx
jmp	short loc_434039
; ---------------------------------------------------------------------------

loc_434035:				; CODE XREF: sub_433E00+290j
mov	ecx, [esp+18h+var_4]

loc_434039:				; CODE XREF: sub_433E00+233j
mov	edx, [esp+18h+var_8]
lea	eax, [edx+esi]
mov	edx, eax
shl	edx, 4
add	edx, eax
mov	eax, [esp+18h+arg_0]
test	ebp, ebp
lea	eax, [eax+edx*4]
mov	dl, [esp+18h+arg_18]
mov	[eax], di
mov	[eax+1Ah], dl
mov	[eax+3Eh], bl
mov	[eax+3Fh], cl
jnz	short loc_43406F
test	esi, esi
jnz	short loc_43406F
mov	dword ptr [eax+38h], 1
jmp	short loc_434076
; ---------------------------------------------------------------------------

loc_43406F:				; CODE XREF: sub_433E00+260j
					; sub_433E00+264j
mov	dword ptr [eax+38h], 0

loc_434076:				; CODE XREF: sub_433E00+26Dj
mov	ecx, [esp+18h+arg_14]
push	ecx
push	eax
call	sub_425A10
mov	eax, [esp+20h+arg_10]
xor	edx, edx
add	esp, 8
inc	esi
mov	dl, [eax+20h]
cmp	esi, edx
jl	short loc_434035

loc_434092:				; CODE XREF: sub_433E00+1FEj
xor	ecx, ecx
inc	ebp
mov	cl, [eax+21h]
cmp	ebp, ecx
jl	loc_433FF7

loc_4340A0:				; CODE XREF: sub_433E00+7Bj
					; sub_433E00+8Cj ...
mov	al, [esp+18h+arg_1C]
pop	esi
pop	ebp
pop	ebx
test	al, al
jnz	short loc_4340C9
mov	edx, dword ptr newData570h_7B786D4
cmp	word ptr [edx+428h], 0FFFFh
jnz	short loc_4340C9
mov	eax, dword ptr dword_79DBE88
push	eax
call	sub_442AD0
add	esp, 4

loc_4340C9:				; CODE XREF: sub_433E00+Ej
					; sub_433E00+2A9j ...
pop	edi
add	esp, 8
retn
sub_433E00 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4340D0 proc	near			; CODE XREF: sub_407F60+22p
					; sub_40A640+83p ...

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_0]
push	ebx
push	ebp
push	esi
cmp	eax, 0FFh
push	edi
jz	loc_4342CA
mov	esi, [esp+10h+arg_4]
cmp	esi, offset word_7CC6C78
jnz	loc_43422A
cmp	eax, 0Ch
jge	loc_43417C
mov	edx, dword ptr newData570h_7B786D4
mov	ecx, eax
shl	ecx, 4
add	ecx, eax
or	esi, 0FFFFFFFFh
cmp	[edx+ecx*4+208h], si
lea	ecx, [edx+ecx*4+208h]
jz	loc_4342CA
test	eax, eax
mov	[ecx], si
mov	[ecx+38h], esi
jnz	short loc_43413C
mov	eax, dword ptr dword_79DBE88
pop	edi
mov	[eax+210h], si
pop	esi
pop	ebp
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_43413C:				; CODE XREF: sub_4340D0+59j
cmp	eax, 1
jnz	short loc_434153
mov	ecx, dword ptr dword_79DBE88
pop	edi
mov	[ecx+224h], si
pop	esi
pop	ebp
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_434153:				; CODE XREF: sub_4340D0+6Fj
cmp	eax, 8
jnz	loc_4342CA
mov	edx, dword ptr dword_79DBE88
push	edx
call	sub_442AD0
mov	eax, dword ptr dword_79DBE88
add	esp, 4
mov	[eax+24Ch], si
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_43417C:				; CODE XREF: sub_4340D0+26j
add	eax, 0FFFFFFF4h
mov	ecx, eax
shl	ecx, 4
add	ecx, eax
mov	ax, [esi+ecx*4]
cmp	ax, 0FFFFh
lea	esi, [esi+ecx*4]
jz	loc_4342CA
movsx	eax, ax
mov	ecx, dword ptr newData3700h1_7BA8518
lea	edx, [eax+eax*4]
lea	eax, [eax+edx*2]
lea	edx, [ecx+eax*4]
xor	ecx, ecx
mov	cl, [eax+edx+20h]
add	eax, edx
mov	edi, ecx
xor	edx, edx
mov	dl, [eax+21h]
xor	ecx, ecx
mov	cl, [esi+3Fh]
mov	eax, edx
mov	ebp, ecx
mov	[esp+10h+arg_0], eax
lea	edx, [eax+ebp]
cmp	ebp, edx
jge	loc_4342CA
mov	edx, ebp
imul	edx, [esp+10h+arg_8]

loc_4341D7:				; CODE XREF: sub_4340D0+153j
xor	ecx, ecx
mov	cl, [esi+3Eh]
lea	ebx, [ecx+edi]
cmp	ecx, ebx
jge	short loc_434213
lea	eax, [edx+ecx]
mov	ebx, eax
shl	ebx, 4
add	ebx, eax
mov	eax, [esp+10h+arg_4]
lea	eax, [eax+ebx*4]

loc_4341F4:				; CODE XREF: sub_4340D0+13Dj
mov	word ptr [eax],	0FFFFh
xor	ebx, ebx
mov	dword ptr [eax+38h], 0
mov	bl, [esi+3Eh]
inc	ecx
add	ebx, edi
add	eax, 44h
cmp	ecx, ebx
jl	short loc_4341F4
mov	eax, [esp+10h+arg_0]

loc_434213:				; CODE XREF: sub_4340D0+111j
mov	ecx, [esp+10h+arg_8]
inc	ebp
add	edx, ecx
xor	ecx, ecx
mov	cl, [esi+3Fh]
add	ecx, eax
cmp	ebp, ecx
jl	short loc_4341D7
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
; ---------------------------------------------------------------------------

loc_43422A:				; CODE XREF: sub_4340D0+1Dj
mov	edx, eax
shl	edx, 4
add	edx, eax
mov	ax, [esi+edx*4]
cmp	ax, 0FFFFh
lea	esi, [esi+edx*4]
jz	loc_4342CA
movsx	eax, ax
mov	edx, dword ptr newData3700h1_7BA8518
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
xor	edx, edx
mov	dl, [eax+ecx+20h]
add	eax, ecx
mov	edi, edx
xor	ecx, ecx
mov	cl, [eax+21h]
xor	edx, edx
mov	dl, [esi+3Fh]
mov	eax, ecx
mov	ebp, edx
mov	[esp+10h+arg_0], eax
lea	ecx, [eax+ebp]
cmp	ebp, ecx
jge	short loc_4342CA
imul	edx, [esp+10h+arg_8]

loc_43427C:				; CODE XREF: sub_4340D0+1F8j
xor	ecx, ecx
mov	cl, [esi+3Eh]
lea	ebx, [ecx+edi]
cmp	ecx, ebx
jge	short loc_4342B8
lea	eax, [edx+ecx]
mov	ebx, eax
shl	ebx, 4
add	ebx, eax
mov	eax, [esp+10h+arg_4]
lea	eax, [eax+ebx*4]

loc_434299:				; CODE XREF: sub_4340D0+1E2j
mov	word ptr [eax],	0FFFFh
xor	ebx, ebx
mov	dword ptr [eax+38h], 0
mov	bl, [esi+3Eh]
inc	ecx
add	ebx, edi
add	eax, 44h
cmp	ecx, ebx
jl	short loc_434299
mov	eax, [esp+10h+arg_0]

loc_4342B8:				; CODE XREF: sub_4340D0+1B6j
mov	ecx, [esp+10h+arg_8]
inc	ebp
add	edx, ecx
xor	ecx, ecx
mov	cl, [esi+3Fh]
add	ecx, eax
cmp	ebp, ecx
jl	short loc_43427C

loc_4342CA:				; CODE XREF: sub_4340D0+Dj
					; sub_4340D0+4Bj ...
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_4340D0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4342D0 proc	near			; CODE XREF: sub_406D40+23p
					; sub_407990+3Cp ...

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

movsx	eax, word ptr word_7CAFF80
mov	edx, dword ptr newData3700h1_7BA8518
sub	esp, 0Ch
lea	ecx, [eax+eax*4]
push	ebx
push	ebp
lea	eax, [eax+ecx*2]
push	esi
push	edi
lea	ecx, [edx+eax*4]
xor	edx, edx
mov	dl, [eax+ecx+20h]
add	eax, ecx
xor	ecx, ecx
mov	esi, edx
mov	cl, [eax+21h]
mov	eax, dword ptr dword_7CC7FE0
cmp	eax, offset word_7CC63F0
jnz	loc_4343BF
mov	eax, dword ptr dword_7CC4380
mov	ebx, eax
and	ebx, 80000007h
jns	short loc_434320
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_434320:				; CODE XREF: sub_4342D0+49j
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
lea	edx, [eax+ecx]
cmp	eax, edx
mov	[esp+1Ch+var_4], edx
jge	loc_434610
lea	ecx, [ebx+esi]
mov	[esp+1Ch+var_8], ecx
lea	ecx, [ebx+eax*8]
mov	esi, ecx
shl	esi, 4
add	esi, ecx
lea	ecx, dword_7CC6428[esi*4]
mov	[esp+1Ch+var_C], ecx

loc_434354:				; CODE XREF: sub_4342D0+E8j
mov	ecx, [esp+1Ch+var_8]
mov	ebp, ebx
cmp	ebx, ecx
jge	short loc_4343A7
mov	edx, [esp+1Ch+var_C]

loc_434362:				; CODE XREF: sub_4342D0+D1j
lea	edi, [edx-38h]
mov	ecx, 11h
mov	esi, offset word_7CAFF80
rep movsd
xor	ecx, ecx
mov	cl, byte_7CAFFBF
cmp	eax, ecx
jnz	short loc_434391
xor	ecx, ecx
mov	cl, byte_7CAFFBE
cmp	ebp, ecx
jnz	short loc_434391
mov	dword ptr [edx], 1
jmp	short loc_434397
; ---------------------------------------------------------------------------

loc_434391:				; CODE XREF: sub_4342D0+ABj
					; sub_4342D0+B7j
mov	dword ptr [edx], 0

loc_434397:				; CODE XREF: sub_4342D0+BFj
mov	ecx, [esp+1Ch+var_8]
inc	ebp
add	edx, 44h
cmp	ebp, ecx
jl	short loc_434362
mov	edx, [esp+1Ch+var_4]

loc_4343A7:				; CODE XREF: sub_4342D0+8Cj
mov	esi, [esp+1Ch+var_C]
inc	eax
add	esi, 220h
cmp	eax, edx
mov	[esp+1Ch+var_C], esi
jl	short loc_434354
jmp	loc_434610
; ---------------------------------------------------------------------------

loc_4343BF:				; CODE XREF: sub_4342D0+36j
cmp	eax, offset byte_7CC4398
jnz	loc_43447D
mov	eax, dword ptr dword_7CC4380
mov	ebx, eax
and	ebx, 80000007h
jns	short loc_4343DE
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_4343DE:				; CODE XREF: sub_4342D0+107j
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
lea	edx, [eax+ecx]
cmp	eax, edx
mov	[esp+1Ch+var_4], edx
jge	loc_434610
lea	ecx, [ebx+esi]
mov	[esp+1Ch+var_8], ecx
lea	ecx, [ebx+eax*8]
mov	esi, ecx
shl	esi, 4
add	esi, ecx
lea	ecx, dword_7CC43D0[esi*4]
mov	[esp+1Ch+var_C], ecx

loc_434412:				; CODE XREF: sub_4342D0+1A6j
mov	ecx, [esp+1Ch+var_8]
mov	ebp, ebx
cmp	ebx, ecx
jge	short loc_434465
mov	edx, [esp+1Ch+var_C]

loc_434420:				; CODE XREF: sub_4342D0+18Fj
lea	edi, [edx-38h]
mov	ecx, 11h
mov	esi, offset word_7CAFF80
rep movsd
xor	ecx, ecx
mov	cl, byte_7CAFFBF
cmp	eax, ecx
jnz	short loc_43444F
xor	ecx, ecx
mov	cl, byte_7CAFFBE
cmp	ebp, ecx
jnz	short loc_43444F
mov	dword ptr [edx], 1
jmp	short loc_434455
; ---------------------------------------------------------------------------

loc_43444F:				; CODE XREF: sub_4342D0+169j
					; sub_4342D0+175j
mov	dword ptr [edx], 0

loc_434455:				; CODE XREF: sub_4342D0+17Dj
mov	ecx, [esp+1Ch+var_8]
inc	ebp
add	edx, 44h
cmp	ebp, ecx
jl	short loc_434420
mov	edx, [esp+1Ch+var_4]

loc_434465:				; CODE XREF: sub_4342D0+14Aj
mov	esi, [esp+1Ch+var_C]
inc	eax
add	esi, 220h
cmp	eax, edx
mov	[esp+1Ch+var_C], esi
jl	short loc_434412
jmp	loc_434610
; ---------------------------------------------------------------------------

loc_43447D:				; CODE XREF: sub_4342D0+F4j
cmp	eax, offset byte_7CC8000
mov	eax, dword ptr dword_7CC4380
jnz	loc_43453B
mov	ebx, eax
and	ebx, 80000007h
jns	short loc_43449C
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_43449C:				; CODE XREF: sub_4342D0+1C5j
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
lea	edx, [eax+ecx]
cmp	eax, edx
mov	[esp+1Ch+var_4], edx
jge	loc_434610
lea	ecx, [ebx+esi]
mov	[esp+1Ch+var_8], ecx
lea	ecx, [ebx+eax*8]
mov	esi, ecx
shl	esi, 4
add	esi, ecx
lea	ecx, byte_7CC8038[esi*4]
mov	[esp+1Ch+var_C], ecx

loc_4344D0:				; CODE XREF: sub_4342D0+264j
mov	ecx, [esp+1Ch+var_8]
mov	ebp, ebx
cmp	ebx, ecx
jge	short loc_434523
mov	edx, [esp+1Ch+var_C]

loc_4344DE:				; CODE XREF: sub_4342D0+24Dj
lea	edi, [edx-38h]
mov	ecx, 11h
mov	esi, offset word_7CAFF80
rep movsd
xor	ecx, ecx
mov	cl, byte_7CAFFBF
cmp	eax, ecx
jnz	short loc_43450D
xor	ecx, ecx
mov	cl, byte_7CAFFBE
cmp	ebp, ecx
jnz	short loc_43450D
mov	dword ptr [edx], 1
jmp	short loc_434513
; ---------------------------------------------------------------------------

loc_43450D:				; CODE XREF: sub_4342D0+227j
					; sub_4342D0+233j
mov	dword ptr [edx], 0

loc_434513:				; CODE XREF: sub_4342D0+23Bj
mov	ecx, [esp+1Ch+var_8]
inc	ebp
add	edx, 44h
cmp	ebp, ecx
jl	short loc_4344DE
mov	edx, [esp+1Ch+var_4]

loc_434523:				; CODE XREF: sub_4342D0+208j
mov	esi, [esp+1Ch+var_C]
inc	eax
add	esi, 220h
cmp	eax, edx
mov	[esp+1Ch+var_C], esi
jl	short loc_4344D0
jmp	loc_434610
; ---------------------------------------------------------------------------

loc_43453B:				; CODE XREF: sub_4342D0+1B7j
cmp	eax, 0Ch
jge	short loc_434564
mov	edx, eax

loc_434542:				; DATA XREF: .data:00484C54o
mov	ecx, 11h
shl	edx, 4
add	edx, eax
mov	eax, dword ptr newData570h_7B786D4
mov	esi, offset word_7CAFF80
lea	edi, [eax+edx*4+208h]
rep movsd
jmp	loc_434610
; ---------------------------------------------------------------------------

loc_434564:				; CODE XREF: sub_4342D0+26Ej
add	eax, 0FFFFFFF4h
mov	ebx, eax
and	ebx, 80000007h
jns	short loc_434576
dec	ebx
or	ebx, 0FFFFFFF8h
inc	ebx

loc_434576:				; CODE XREF: sub_4342D0+29Fj
cdq
and	edx, 7
add	eax, edx
sar	eax, 3
lea	edx, [eax+ecx]
cmp	eax, edx
mov	[esp+1Ch+var_4], edx
jge	loc_434610
lea	ecx, [ebx+esi]
mov	[esp+1Ch+var_8], ecx
lea	ecx, [ebx+eax*8]
mov	esi, ecx
shl	esi, 4
add	esi, ecx
lea	ecx, dword_7CC6CB0[esi*4]
mov	[esp+1Ch+var_C], ecx

loc_4345AA:				; CODE XREF: sub_4342D0+33Ej
mov	ecx, [esp+1Ch+var_8]
mov	ebp, ebx
cmp	ebx, ecx
jge	short loc_4345FD
mov	edx, [esp+1Ch+var_C]

loc_4345B8:				; CODE XREF: sub_4342D0+327j
lea	edi, [edx-38h]
mov	ecx, 11h
mov	esi, offset word_7CAFF80
rep movsd
xor	ecx, ecx
mov	cl, byte_7CAFFBF
cmp	eax, ecx
jnz	short loc_4345E7
xor	ecx, ecx
mov	cl, byte_7CAFFBE
cmp	ebp, ecx
jnz	short loc_4345E7
mov	dword ptr [edx], 1
jmp	short loc_4345ED
; ---------------------------------------------------------------------------

loc_4345E7:				; CODE XREF: sub_4342D0+301j
					; sub_4342D0+30Dj
mov	dword ptr [edx], 0

loc_4345ED:				; CODE XREF: sub_4342D0+315j
mov	ecx, [esp+1Ch+var_8]
inc	ebp
add	edx, 44h
cmp	ebp, ecx
jl	short loc_4345B8
mov	edx, [esp+1Ch+var_4]

loc_4345FD:				; CODE XREF: sub_4342D0+2E2j
mov	esi, [esp+1Ch+var_C]
inc	eax
add	esi, 220h
cmp	eax, edx
mov	[esp+1Ch+var_C], esi
jl	short loc_4345AA

loc_434610:				; CODE XREF: sub_4342D0+62j
					; sub_4342D0+EAj ...
mov	edx, dword ptr dword_79DBE88
mov	dword ptr dword_7CAFFB8, 0
push	edx
call	sub_419240
push	0
push	0
push	1Dh
call	sub_401570
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
sub_4342D0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_434640(float,	float, float, float, int)
sub_434640 proc	near			; CODE XREF: sub_434B40+16p
					; sub_434B40+31p ...

var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

push	ecx
mov	eax, dword ptr dword_5727420
push	ebx
xor	ebx, ebx
push	ebp
push	esi
cmp	eax, ebx
push	edi
jg	loc_434B2C
mov	al, byte_7CC88E1
test	al, al
jnz	loc_434B2C
fld	[esp+14h+arg_0]
call	__ftol
fld	[esp+14h+arg_4]
mov	esi, eax
mov	eax, dword ptr dword_7CC3AF0
add	esi, eax
mov	[esp+14h+var_4], esi
call	__ftol
mov	ebp, dword ptr dword_7CC3AEC
mov	edi, eax
mov	ecx, dword ptr newData570h_7B786D4
add	edi, ebp
mov	ebp, [esp+14h+arg_10]
mov	[esp+14h+arg_4], edi
mov	eax, ebp
shl	eax, 4
add	eax, ebp
lea	edx, [ecx+eax*4+208h]
mov	eax, dword ptr dword_7CAFFB8
cmp	eax, ebx
mov	[esp+14h+arg_0], edx
jle	loc_434A48
cmp	dword ptr dword_81C17B4, esi
jl	loc_434B2C
fild	dword ptr dword_81C17B4
fild	[esp+14h+var_4]
fadd	[esp+14h+arg_8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_434B2C
cmp	dword ptr dword_81C17B0, edi
jl	loc_434B2C
fild	dword ptr dword_81C17B0
fild	[esp+14h+arg_4]
fadd	[esp+14h+arg_C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_434B2C
mov	eax, dword ptr dword_79DBE88
mov	si, word ptr word_7CAFF80
mov	byte_7CC88E0, 1
mov	bl, 1
movsx	edx, word ptr [ecx+208h]
mov	al, [eax+178h]
mov	[esp+14h+arg_8], edx
movsx	edx, word ptr [ecx+24Ch]
cmp	al, 3
jnz	short loc_434764
movsx	eax, si
mov	edi, dword ptr newData3700h1_7BA8518
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [eax+eax*4]
mov	al, [ecx+edi+32h]
test	al, al
jz	short loc_434752
jmp	short loc_434786
; ---------------------------------------------------------------------------

loc_434752:				; CODE XREF: sub_434640+10Ej
mov	al, [ecx+edi+2Fh]
test	al, al
jnz	short loc_434786
mov	al, [ecx+edi+30h]
test	al, al
jnz	short loc_434786
jmp	short loc_434784
; ---------------------------------------------------------------------------

loc_434764:				; CODE XREF: sub_434640+F4j
movsx	ecx, si
and	eax, 0FFh
lea	edi, [ecx+ecx*4]
lea	ecx, [ecx+edi*2]
mov	edi, dword ptr newData3700h1_7BA8518
lea	ecx, [ecx+ecx*4]
add	eax, ecx
cmp	byte ptr [eax+edi+2Fh],	0
jnz	short loc_434786

loc_434784:				; CODE XREF: sub_434640+122j
xor	bl, bl

loc_434786:				; CODE XREF: sub_434640+110j
					; sub_434640+118j ...
cmp	si, 47h
jz	loc_4348A2
cmp	si, 4Fh
jz	loc_4348A2
mov	eax, [esp+14h+arg_8]
cmp	eax, 0FFFFFFFFh
jz	short loc_4347E1
cmp	eax, 47h
jz	short loc_4347E1
cmp	eax, 4Fh
jz	short loc_4347E1
cmp	ebp, 1
jnz	short loc_4347E1
cmp	byte ptr [ecx+edi+20h],	2
jb	short loc_4347C7
cmp	si, 60h
jl	short loc_4347C5
cmp	si, 70h
jl	short loc_4347C7

loc_4347C5:				; CODE XREF: sub_434640+17Dj
xor	bl, bl

loc_4347C7:				; CODE XREF: sub_434640+177j
					; sub_434640+183j
mov	eax, [esp+14h+arg_8]
lea	ebp, [eax+eax*4]
lea	eax, [eax+ebp*2]
lea	ebp, [edi+eax*4]
cmp	byte ptr [eax+ebp+20h],	2
jb	short loc_4347DD
xor	bl, bl

loc_4347DD:				; CODE XREF: sub_434640+199j
mov	ebp, [esp+14h+arg_10]

loc_4347E1:				; CODE XREF: sub_434640+161j
					; sub_434640+166j ...
cmp	edx, 0FFFFFFFFh
jz	loc_4348A2
cmp	edx, 47h
jz	loc_4348A2
cmp	edx, 4Fh
jz	loc_4348A2
test	ebp, ebp
jnz	loc_4348A2
cmp	byte ptr [ecx+edi+20h],	2
jb	short loc_43480D
xor	bl, bl

loc_43480D:				; CODE XREF: sub_434640+1C9j
lea	eax, [edx+edx*4]
lea	eax, [edx+eax*2]
lea	ebp, [edi+eax*4]
cmp	byte ptr [eax+ebp+20h],	2
jb	short loc_434829
cmp	edx, 60h
jl	short loc_434827
cmp	edx, 70h
jl	short loc_434829

loc_434827:				; CODE XREF: sub_434640+1E0j
xor	bl, bl

loc_434829:				; CODE XREF: sub_434640+1DBj
					; sub_434640+1E5j
mov	ebp, [esp+14h+arg_10]

loc_43482D:				; CODE XREF: sub_434640+265j
					; sub_434640+27Ej ...
mov	edx, dword ptr equNewData570h_7B786CC
mov	ax, word ptr word_7CAFF9C
cmp	ax, [edx+14h]
jbe	short loc_434841
xor	bl, bl

loc_434841:				; CODE XREF: sub_434640+1FDj
mov	ax, word ptr word_7CAFF9E
cmp	ax, [edx+16h]
jbe	short loc_43484F
xor	bl, bl

loc_43484F:				; CODE XREF: sub_434640+20Bj
mov	ax, word ptr word_7CAFFA0
cmp	ax, [edx+1Ah]
jbe	short loc_43485D
xor	bl, bl

loc_43485D:				; CODE XREF: sub_434640+219j
mov	eax, dword ptr dword_7CAFF88
cmp	al, 0Ah
jz	short loc_43487C
cmp	al, 0Bh
jz	short loc_43487C
cmp	al, 9
jz	short loc_43487C
cmp	al, 8
jz	short loc_43487C
cmp	al, 7
jnz	short loc_4348F0
mov	edx, dword ptr equNewData570h_7B786CC

loc_43487C:				; CODE XREF: sub_434640+224j
					; sub_434640+228j ...
mov	bp, word ptr word_7CAFFA2
cmp	bp, [edx+0Eh]
jbe	short loc_43488B
xor	bl, bl

loc_43488B:				; CODE XREF: sub_434640+247j
cmp	al, 7
jnz	short loc_4348EC
cmp	si, 0C8h
jl	short loc_434906
cmp	si, 0D0h
jge	short loc_434906
jmp	loc_434923
; ---------------------------------------------------------------------------

loc_4348A2:				; CODE XREF: sub_434640+14Aj
					; sub_434640+154j ...
cmp	ebp, 1
jnz	short loc_43482D
cmp	si, 4Fh
jnz	short loc_4348AF
xor	bl, bl

loc_4348AF:				; CODE XREF: sub_434640+26Bj
mov	edx, dword ptr equNewData570h_7B786CC
mov	al, [edx+0Bh]
test	al, al
jz	short loc_4348C4
cmp	al, 2
jnz	loc_43482D

loc_4348C4:				; CODE XREF: sub_434640+27Aj
test	si, si
jl	short loc_4348D1
cmp	si, 40h
jge	short loc_4348D1
xor	bl, bl

loc_4348D1:				; CODE XREF: sub_434640+287j
					; sub_434640+28Dj
cmp	si, 50h
jl	loc_43482D
cmp	si, 60h
jge	loc_43482D
xor	bl, bl
jmp	loc_43482D
; ---------------------------------------------------------------------------

loc_4348EC:				; CODE XREF: sub_434640+24Dj
mov	ebp, [esp+14h+arg_10]

loc_4348F0:				; CODE XREF: sub_434640+234j
cmp	al, 8
jnz	short loc_43490A
cmp	si, 0D2h
jnz	short loc_43490A
cmp	dword_81C1528, 7
jz	short loc_434923
jmp	short loc_43490A
; ---------------------------------------------------------------------------

loc_434906:				; CODE XREF: sub_434640+254j
					; sub_434640+25Bj
mov	ebp, [esp+14h+arg_10]

loc_43490A:				; CODE XREF: sub_434640+2B2j
					; sub_434640+2B9j ...
test	bl, bl
jz	short loc_434923
mov	edx, eax
and	edx, 0FFh
cmp	edx, ebp
jz	short loc_434967
cmp	al, 0Ah
jnz	short loc_434957
cmp	ebp, 0Bh
jz	short loc_434967

loc_434923:				; CODE XREF: sub_434640+25Dj
					; sub_434640+2C2j ...
mov	edx, [esp+14h+arg_0]
mov	byte ptr [edx+40h], 3
mov	al, byte_81C1660
test	al, al
jz	loc_434B2C
mov	al, byte_7CC88E1
mov	byte_81C1660, 0
test	al, al
jnz	loc_434B2C
call	sub_4342D0
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_434957:				; CODE XREF: sub_434640+2DCj
test	al, al
jnz	short loc_434923
cmp	ebp, 1
jnz	short loc_434923
cmp	byte ptr [ecx+edi+20h],	2
jnb	short loc_434923

loc_434967:				; CODE XREF: sub_434640+2D8j
					; sub_434640+2E1j
mov	eax, [esp+14h+arg_0]
mov	byte ptr [eax+40h], 2
mov	al, byte_81C1660
test	al, al
jz	loc_434B2C
mov	eax, ebp
cmp	ebp, 1
mov	byte_81C1660, 0
mov	dword ptr dword_7C41D30, eax
jnz	short loc_4349AF
mov	cx, word ptr word_7CAFF80
test	cx, cx
jl	short loc_4349AF
cmp	cx, 30h
jge	short loc_4349AF
cmp	[esp+14h+arg_8], 0FFFFFFFFh
jnz	short loc_4349AF
xor	eax, eax
mov	dword ptr dword_7C41D30, eax

loc_4349AF:				; CODE XREF: sub_434640+34Dj
					; sub_434640+359j ...
mov	ecx, dword ptr dword_7CC7FE0
cmp	ecx, offset word_7CC6C78
jnz	short loc_4349D7
mov	ecx, dword ptr dword_7CC4380
push	eax
push	0
push	ecx
push	0
call	sub_406830
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_4349D7:				; CODE XREF: sub_434640+37Bj
cmp	ecx, offset byte_7CC4398
jnz	short loc_4349F9
mov	edx, dword ptr dword_7CC4380
push	eax
push	0
push	edx
push	2
call	sub_406830
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_4349F9:				; CODE XREF: sub_434640+39Dj
cmp	ecx, offset byte_7CC8000
jnz	short loc_434A1A
push	eax
mov	eax, dword ptr dword_7CC4380
push	0
push	eax
push	3
call	sub_406830
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_434A1A:				; CODE XREF: sub_434640+3BFj
mov	cl, byte_7CC88AD
test	cl, cl
jnz	short loc_434A2E
mov	dword ptr dword_7CC88B4, 96h

loc_434A2E:				; CODE XREF: sub_434640+3E2j
mov	ecx, dword ptr dword_7CC4380
push	eax
push	0
push	ecx
push	1
call	sub_406830
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_434A48:				; CODE XREF: sub_434640+71j
cmp	word ptr [edx],	0FFFFh
jz	loc_434B2C
cmp	dword ptr dword_81C17B4, esi
jl	loc_434B2C
fild	dword ptr dword_81C17B4
fild	[esp+14h+var_4]
fadd	[esp+14h+arg_8]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_434B2C
cmp	dword ptr dword_81C17B0, edi
jl	loc_434B2C
fild	dword ptr dword_81C17B0
fild	[esp+14h+arg_4]
fadd	[esp+14h+arg_C]
fcompp
fnstsw	ax
test	ah, 41h
jnz	loc_434B2C
mov	al, byte_81C1660
mov	byte_7CC88E0, 1
test	al, al
jz	short loc_434B00
mov	ecx, 11h
mov	esi, edx
mov	edi, offset word_7CAFF80
mov	byte_81C1660, 0
rep movsd
mov	word ptr [edx],	0FFFFh
mov	[edx+4], ebx
mov	eax, dword ptr dword_79DBE88
mov	dword ptr dword_7CC7FE0, offset word_7CC6C78
push	eax
mov	dword ptr dword_7CC4380, ebp
call	sub_419240
push	ebx
push	ebx
push	1Dh
mov	dword ptr dword_7CC88DC, ebx
call	sub_401570
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_434B00:				; CODE XREF: sub_434640+46Ej
fld	[esp+14h+arg_8]
mov	byte ptr [edx+40h], 2
mov	byte_7CC7FFC, 0
mov	dword ptr dword_7CC88DC, edx
call	__ftol
cdq
sub	eax, edx
mov	dword ptr dword_7CC6C70, edi
sar	eax, 1
add	eax, esi
mov	dword ptr dword_7CC6C74, eax

loc_434B2C:				; CODE XREF: sub_434640+Ej
					; sub_434640+1Bj ...
pop	edi
pop	esi
pop	ebp
pop	ebx
pop	ecx
retn
sub_434640 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_434B40 proc	near			; CODE XREF: sub_4370D0+A48p
push	8				; int
push	42200000h			; float
push	42200000h			; float
push	42380000h			; float
push	41700000h			; float
call	sub_434640
push	7				; int
push	42200000h			; float
push	42700000h			; float
push	42380000h			; float
push	42E60000h			; float
call	sub_434640
mov	eax, dword ptr equNewData570h_7B786CC
add	esp, 28h
cmp	byte ptr [eax+0Bh], 3
jz	short loc_434BA2
push	2				; int
push	42200000h			; float
push	42200000h			; float
push	42380000h			; float
push	42960000h			; float
call	sub_434640
add	esp, 14h

loc_434BA2:				; CODE XREF: sub_434B40+42j
push	3				; int
push	42700000h			; float
push	42200000h			; float
push	42B20000h			; float
push	42960000h			; float
call	sub_434640
push	4				; int
push	42200000h			; float
push	42200000h			; float
push	43180000h			; float
push	42960000h			; float
call	sub_434640
push	0				; int
push	42700000h			; float
push	42200000h			; float
push	42B20000h			; float
push	41700000h			; float
call	sub_434640
push	1				; int
push	42700000h			; float
push	42200000h			; float
push	42B20000h			; float
push	43060000h			; float
call	sub_434640
add	esp, 50h
push	5				; int
push	42200000h			; float
push	42200000h			; float
push	43180000h			; float
push	41700000h			; float
call	sub_434640
push	6				; int
push	42200000h			; float
push	42200000h			; float
push	43180000h			; float
push	43060000h			; float
call	sub_434640
push	9				; int
push	41A00000h			; float
push	41A00000h			; float
push	42B20000h			; float
push	425C0000h			; float
call	sub_434640
push	0Ah				; int
push	41A00000h			; float
push	41A00000h			; float
push	43180000h			; float
push	425C0000h			; float
call	sub_434640
add	esp, 50h
push	0Bh				; int
push	41A00000h			; float
push	41A00000h			; float
push	43180000h			; float
push	42E60000h			; float
call	sub_434640
add	esp, 14h
retn
sub_434B40 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_434CA0 proc	near			; CODE XREF: sub_4370D0+A70p
					; sub_4370D0+A9Ep ...

var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

mov	eax, dword ptr dword_5727420
sub	esp, 28h
test	eax, eax
push	ebx
push	ebp
push	esi
push	edi
jg	loc_435098
mov	al, byte_7CC88E1
test	al, al
jnz	loc_435098
mov	eax, dword ptr dword_7CAFFB8
test	eax, eax
jg	loc_435098
mov	eax, [esp+38h+arg_10]
mov	[esp+38h+var_14], 0
test	eax, eax
jle	loc_435098
mov	ebx, [esp+38h+arg_C]
mov	edx, [esp+38h+arg_4]
mov	ebp, [esp+38h+arg_8]
mov	esi, ebx
shl	esi, 4
add	esi, ebx
mov	[esp+38h+var_10], edx
shl	esi, 2
mov	[esp+38h+var_4], esi
mov	[esp+38h+var_C], ebp

loc_434D04:				; CODE XREF: sub_434CA0+232j
test	ebx, ebx
mov	[esp+38h+var_1C], 0
jle	loc_434EB2
mov	ecx, [esp+38h+arg_0]
mov	[esp+38h+var_18], ecx

loc_434D1C:				; CODE XREF: sub_434CA0+20Cj
mov	eax, dword ptr dword_81C17B4
cmp	eax, ecx
jl	loc_434E97
lea	edi, [ecx+14h]
cmp	eax, edi
jge	loc_434E97
mov	eax, dword ptr dword_81C17B0
cmp	eax, edx
jl	loc_434E97
lea	edi, [edx+14h]
cmp	eax, edi
jge	loc_434E97
mov	ax, [ebp+0]
cmp	ax, 0FFFFh
jz	loc_434E97
movsx	eax, ax
mov	edx, dword ptr newData3700h1_7BA8518
lea	esi, [ebp+3Fh]
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [edx+eax*4]
xor	edx, edx
mov	dl, [eax+ecx+20h]
add	eax, ecx
mov	[esp+38h+var_24], edx
xor	edx, edx
mov	dl, [eax+21h]
xor	eax, eax
mov	al, [esi]
mov	[esp+38h+var_8], edx
mov	edi, eax
lea	ecx, [edi+edx]
cmp	edi, ecx
jge	short loc_434E00
mov	ecx, edi
lea	eax, [esi-1]
imul	ecx, ebx
mov	[esp+38h+var_28], eax
mov	[esp+38h+var_20], ecx

loc_434DA1:				; CODE XREF: sub_434CA0+15Ej
mov	ebx, [esp+38h+var_28]
xor	eax, eax
mov	al, [ebx]
mov	ebx, [esp+38h+var_24]
add	ebx, eax
cmp	eax, ebx
jge	short loc_434DEB
add	ecx, eax
mov	edx, ecx
shl	edx, 4
add	edx, ecx
mov	ecx, [esp+38h+arg_8]
lea	ecx, [ecx+edx*4+40h]

loc_434DC4:				; CODE XREF: sub_434CA0+13Bj
mov	ebx, [esp+38h+var_28]
xor	edx, edx
mov	byte ptr [ecx],	2
inc	eax
mov	dl, [ebx]
mov	ebx, [esp+38h+var_24]
add	edx, ebx
add	ecx, 44h
cmp	eax, edx
jl	short loc_434DC4
mov	ebx, [esp+38h+arg_C]
mov	edx, [esp+38h+var_8]
mov	ecx, [esp+38h+var_20]
jmp	short loc_434DEF
; ---------------------------------------------------------------------------

loc_434DEB:				; CODE XREF: sub_434CA0+111j
mov	ebx, [esp+38h+arg_C]

loc_434DEF:				; CODE XREF: sub_434CA0+149j
xor	eax, eax
inc	edi
mov	al, [esi]
add	ecx, ebx
add	eax, edx
mov	[esp+38h+var_20], ecx
cmp	edi, eax
jl	short loc_434DA1

loc_434E00:				; CODE XREF: sub_434CA0+EFj
mov	cl, [esp+38h+arg_14]
mov	dword ptr dword_7CC88DC, ebp
mov	byte_7CC7FFC, cl
movsx	eax, word ptr [ebp+0]
lea	edx, [eax+eax*4]
lea	eax, [eax+edx*2]
mov	edx, dword ptr newData3700h1_7BA8518
lea	edi, [edx+eax*4]
xor	edx, edx
mov	dl, [eax+edi+20h]
mov	edi, [esp+38h+arg_0]
mov	eax, edx
lea	eax, [eax+eax*4]
shl	eax, 2
cdq
sub	eax, edx
mov	edx, eax
xor	eax, eax
mov	al, [ebp+3Eh]
sar	edx, 1
lea	eax, [eax+eax*4]

loc_434E44:				; DATA XREF: .data:00484B7Co
					; .data:00484BDCo
add	edi, edx
lea	edx, [edi+eax*4]
xor	eax, eax
mov	dword ptr dword_7CC6C74, edx
mov	al, [esi]
mov	edx, [esp+38h+arg_4]
lea	eax, [eax+eax*4]
lea	eax, [edx+eax*4]
mov	dword ptr dword_7CC6C70, eax
mov	eax, [esp+38h+arg_8]
cmp	eax, offset word_7CC3B00
jz	short loc_434E8B
mov	al, byte_81C1660
test	cl, cl
jnz	short loc_434EE0
test	al, al
jnz	loc_434F4F
mov	al, byte_81C1804
test	al, al
jnz	loc_435034

loc_434E8B:				; CODE XREF: sub_434CA0+1CBj
mov	ecx, [esp+38h+var_18]
mov	edx, [esp+38h+var_10]
mov	esi, [esp+38h+var_4]

loc_434E97:				; CODE XREF: sub_434CA0+83j
					; sub_434CA0+8Ej ...
mov	eax, [esp+38h+var_1C]
add	ebp, 44h
inc	eax
add	ecx, 14h
cmp	eax, ebx
mov	[esp+38h+var_1C], eax
mov	[esp+38h+var_18], ecx
jl	loc_434D1C

loc_434EB2:				; CODE XREF: sub_434CA0+6Ej
mov	eax, [esp+38h+var_14]
mov	ebp, [esp+38h+var_C]
mov	ecx, [esp+38h+arg_10]
inc	eax
add	edx, 14h
add	ebp, esi
cmp	eax, ecx
mov	[esp+38h+var_14], eax
mov	[esp+38h+var_10], edx
mov	[esp+38h+var_C], ebp
jl	loc_434D04
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
; ---------------------------------------------------------------------------

loc_434EE0:				; CODE XREF: sub_434CA0+1D4j
test	al, al
jz	loc_435098
mov	eax, dword ptr dword_572741C
mov	byte_81C1660, 0
test	eax, eax
jnz	loc_435098
xor	ecx, ecx
xor	edx, edx
mov	cl, [ebp+3Fh]
mov	dl, [ebp+3Eh]
mov	esi, ecx
mov	ecx, [esp+38h+arg_8]
imul	esi, ebx
add	esi, edx
push	0
mov	eax, esi
shl	eax, 4
add	eax, esi
lea	edx, [ecx+eax*4]
push	edx
call	sub_426010
push	eax
push	esi
call	sub_4067A0
mov	al, [ebp+0]
add	esp, 10h
mov	byte_7CB003C, al
mov	cl, [ebp+4]
mov	byte_7CB003D, cl
mov	dl, [ebp+1Ah]
pop	edi
pop	esi
pop	ebp
mov	byte_7CB003E, dl
pop	ebx
add	esp, 28h
retn
; ---------------------------------------------------------------------------

loc_434F4F:				; CODE XREF: sub_434CA0+1D8j
xor	eax, eax
mov	byte_81C1660, 0
mov	al, [ebp+3Fh]
xor	ecx, ecx
imul	eax, ebx
mov	cl, [ebp+3Eh]
mov	edi, offset word_7CAFF80
add	eax, ecx
mov	ecx, 11h
mov	edx, eax
shl	edx, 4
add	edx, eax
mov	eax, [esp+38h+arg_8]
lea	esi, [eax+edx*4]
rep movsd
mov	esi, eax
cmp	esi, offset word_7CC6C78
mov	dword ptr dword_7CC7FE0, esi
jnz	short loc_434FBA
xor	ecx, ecx
xor	edx, edx
mov	cl, [ebp+3Fh]
mov	dl, [ebp+3Eh]
imul	ecx, ebx
push	ebx
push	esi
lea	eax, [ecx+edx+0Ch]
xor	ecx, ecx
mov	dword ptr dword_7CC4380, eax
mov	cl, [ebp+3Fh]
imul	ecx, ebx
xor	edx, edx
mov	dl, [ebp+3Eh]
lea	eax, [ecx+edx+0Ch]
jmp	short loc_434FE0
; ---------------------------------------------------------------------------

loc_434FBA:				; CODE XREF: sub_434CA0+2EDj
xor	ecx, ecx
xor	edx, edx
mov	cl, [ebp+3Fh]
mov	dl, [ebp+3Eh]
imul	ecx, ebx
add	ecx, edx
xor	eax, eax
mov	dword ptr dword_7CC4380, ecx
mov	al, [ebp+3Fh]
imul	eax, ebx
xor	ecx, ecx
push	ebx
mov	cl, [ebp+3Eh]
push	esi
add	eax, ecx

loc_434FE0:				; CODE XREF: sub_434CA0+318j
push	eax
call	sub_4340D0
mov	al, byte_7CC88C3
add	esp, 0Ch
test	al, al
mov	dword ptr dword_7CC88DC, 0
jz	short loc_43501E
mov	al, byte_7CC88AD
test	al, al
jz	short loc_43501E
cmp	esi, offset word_7CC63F0
jnz	short loc_43501E
push	0
mov	byte_7CC88AD, 0
call	sub_406C50
add	esp, 4

loc_43501E:				; CODE XREF: sub_434CA0+35Aj
					; sub_434CA0+363j ...
push	0
push	0
push	1Dh
call	sub_401570
add	esp, 0Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
; ---------------------------------------------------------------------------

loc_435034:				; CODE XREF: sub_434CA0+1E5j
xor	eax, eax
mov	byte_81C1804, 0
mov	al, [ebp+3Fh]
xor	edx, edx
imul	eax, ebx
mov	dl, [ebp+3Eh]
mov	bp, [ebp+0]
add	eax, edx
cmp	bp, 0EAh
jz	short loc_43508D
cmp	bp, 0E0h
jl	short loc_435063
cmp	bp, 0E6h
jle	short loc_43508D

loc_435063:				; CODE XREF: sub_434CA0+3BAj
cmp	bp, 0E8h
jl	short loc_435071
cmp	bp, 0E9h
jle	short loc_43508D

loc_435071:				; CODE XREF: sub_434CA0+3C8j
cmp	bp, 0F0h
jl	short loc_43507F
cmp	bp, 100h
jl	short loc_43508D

loc_43507F:				; CODE XREF: sub_434CA0+3D6j
cmp	bp, 0C8h
jl	short loc_435098
cmp	bp, 0D0h
jge	short loc_435098

loc_43508D:				; CODE XREF: sub_434CA0+3B3j
					; sub_434CA0+3C1j ...
push	0
push	eax
call	sub_406930
add	esp, 8

loc_435098:				; CODE XREF: sub_434CA0+Ej
					; sub_434CA0+1Bj ...
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 28h
retn
sub_434CA0 endp


; =============== S U B	R O U T	I N E =======================================


sub_4350A0 proc	near			; CODE XREF: sub_435240+135p

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

sub	esp, 0Ch
push	ebx
push	ebp
push	esi
mov	ecx, dword ptr newData3700h1_7BA8518
movsx	esi, word ptr word_7CAFF80
push	edi
lea	eax, [esi+esi*4]
lea	eax, [esi+eax*2]
lea	edx, [ecx+eax*4]
xor	ecx, ecx
mov	cl, [eax+edx+20h]
add	eax, edx
xor	edx, edx
mov	[esp+1Ch+var_C], ecx
mov	dl, [eax+21h]
mov	eax, dword ptr dword_81C17B4
mov	ecx, [esp+1Ch+arg_0]
mov	ebp, edx
sub	eax, ecx
mov	[esp+1Ch+var_8], ebp
mov	[esp+1Ch+arg_0], eax
fild	[esp+1Ch+arg_0]
fmul	dword ptr flt_478880
fild	[esp+1Ch+var_C]
fmul	dword ptr flt_4786E0
fsubp	st(1), st
fadd	dword ptr flt_4786E0
call	__ftol
mov	ecx, dword ptr dword_81C17B0
mov	ebx, [esp+1Ch+arg_4]
sub	ecx, ebx
mov	edi, eax
mov	[esp+1Ch+arg_0], ecx
mov	[esp+1Ch+var_4], edi
fild	[esp+1Ch+arg_0]
fmul	dword ptr flt_478880
fild	[esp+1Ch+var_8]
fmul	dword ptr flt_4786E0
fsubp	st(1), st
fadd	dword ptr flt_4786E0
call	__ftol
lea	ecx, [eax+ebp]
mov	[esp+1Ch+arg_0], 0
cmp	eax, ecx
mov	ebx, eax
jge	short loc_4351B5
mov	edx, [esp+1Ch+var_C]
add	edi, edx
mov	[esp+1Ch+arg_4], edi
mov	edi, eax
imul	edi, [esp+1Ch+arg_C]

loc_43515D:				; CODE XREF: sub_4350A0+10Fj
mov	edx, [esp+1Ch+var_4]
mov	ecx, [esp+1Ch+arg_4]
cmp	edx, ecx
jge	short loc_43519F

loc_435169:				; CODE XREF: sub_4350A0+FDj
test	edx, edx
jl	short loc_435196
test	ebx, ebx
jl	short loc_435196
cmp	edx, [esp+1Ch+arg_C]
jge	short loc_435196
cmp	ebx, [esp+1Ch+arg_10]
jge	short loc_435196
lea	ecx, [edi+edx]
mov	ebp, ecx
shl	ebp, 4
add	ebp, ecx
mov	ecx, [esp+1Ch+arg_8]
cmp	word ptr [ecx+ebp*4], 0FFFFh
jnz	short loc_435196
inc	[esp+1Ch+arg_0]

loc_435196:				; CODE XREF: sub_4350A0+CBj
					; sub_4350A0+CFj ...
mov	ecx, [esp+1Ch+arg_4]
inc	edx
cmp	edx, ecx
jl	short loc_435169

loc_43519F:				; CODE XREF: sub_4350A0+C7j
mov	ebp, [esp+1Ch+arg_C]
inc	ebx
add	edi, ebp
mov	ebp, [esp+1Ch+var_8]
lea	ecx, [eax+ebp]
cmp	ebx, ecx
jl	short loc_43515D
mov	edi, [esp+1Ch+var_4]

loc_4351B5:				; CODE XREF: sub_4350A0+AAj
imul	ebp, [esp+1Ch+var_C]
cmp	[esp+1Ch+arg_0], ebp
jnz	short loc_4351CA
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_4351CA:				; CODE XREF: sub_4350A0+11Ej
mov	ecx, [esp+1Ch+arg_8]
cmp	ecx, offset word_7CC6C78
jnz	short loc_435232
imul	eax, [esp+1Ch+arg_C]
add	eax, edi
mov	edx, eax
shl	edx, 4
add	edx, eax
movsx	eax, word ptr [ecx+edx*4]
cmp	esi, eax
jnz	short loc_435232
cmp	esi, 0E0h
jl	short loc_435214
cmp	esi, 0E8h
jg	short loc_435214
cmp	eax, 0E0h
jl	short loc_435214
cmp	eax, 0E8h
jg	short loc_435214
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_435214:				; CODE XREF: sub_4350A0+152j
					; sub_4350A0+15Aj ...
cmp	esi, 47h
jz	short loc_43521E
cmp	esi, 4Fh
jnz	short loc_435232

loc_43521E:				; CODE XREF: sub_4350A0+177j
cmp	eax, 47h
jz	short loc_435228
cmp	eax, 4Fh
jnz	short loc_435232

loc_435228:				; CODE XREF: sub_4350A0+181j
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_435232:				; CODE XREF: sub_4350A0+134j
					; sub_4350A0+14Aj ...
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0Ch
retn
sub_4350A0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_435240 proc	near			; CODE XREF: sub_435840+7Fp
					; sub_435840+B5p ...

var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h

sub	esp, 0Ch

loc_435243:				; DATA XREF: .data:00484C34o
movsx	eax, word ptr word_7CAFF80
mov	edx, dword ptr newData3700h1_7BA8518
push	ebx
lea	ecx, [eax+eax*4]
mov	ebx, [esp+10h+arg_0]
push	ebp
push	esi
lea	eax, [eax+ecx*2]
push	edi
lea	ecx, [edx+eax*4]
xor	edx, edx
mov	dl, [eax+ecx+20h]
add	eax, ecx
mov	[esp+1Ch+var_4], edx
mov	edx, dword ptr dword_81C17B4
sub	edx, ebx
xor	ecx, ecx
mov	[esp+1Ch+arg_0], edx
mov	cl, [eax+21h]
fild	[esp+1Ch+arg_0]
mov	[esp+1Ch+var_8], ecx
fmul	dword ptr flt_478880
fild	[esp+1Ch+var_4]
fmul	dword ptr flt_4786E0
fsubp	st(1), st
fadd	dword ptr flt_4786E0
call	__ftol
mov	ebp, [esp+1Ch+arg_4]
mov	esi, eax
mov	eax, dword ptr dword_81C17B0
mov	[esp+1Ch+var_C], esi
sub	eax, ebp
mov	[esp+1Ch+arg_0], eax
fild	[esp+1Ch+arg_0]
fmul	dword ptr flt_478880
fild	[esp+1Ch+var_8]
fmul	dword ptr flt_4786E0
fsubp	st(1), st
fadd	dword ptr flt_4786E0
call	__ftol
test	esi, esi
mov	edi, eax
jl	loc_43578E
test	edi, edi
jl	loc_43578E
mov	esi, [esp+1Ch+arg_8]
cmp	esi, offset byte_7CC8000
jnz	short loc_435368
mov	eax, dword ptr dword_7CC88C8
mov	byte ptr [esp+1Ch+arg_0], 0
test	eax, eax
jz	short loc_43530C
mov	byte ptr [esp+1Ch+arg_0], 0
jmp	short loc_435381
; ---------------------------------------------------------------------------

loc_43530C:				; CODE XREF: sub_435240+C3j
mov	ax, word ptr word_7CAFF80
cmp	ax, 0EDh
jz	short loc_435368
cmp	ax, 0EEh
jz	short loc_435368
cmp	ax, 0CFh
jz	short loc_435368
cmp	ax, 0C0h
jge	short loc_435381
mov	ecx, dword ptr dword_7CAFF84
and	ecx, 78h
cmp	cl, 20h
jl	short loc_435381
mov	edx, dword ptr dword_7CAFFA4
xor	ecx, ecx

loc_435340:				; DATA XREF: .data:00484CBCo
and	edx, 0FFh
jle	short loc_435381

loc_435348:				; CODE XREF: sub_435240+11Ej
mov	al, [ecx+dword_7CAFFA4+1]
cmp	al, 3Ch
jb	short loc_43535B
cmp	al, 3Fh
ja	short loc_43535B
mov	byte ptr [esp+1Ch+arg_0], 1

loc_43535B:				; CODE XREF: sub_435240+110j
					; sub_435240+114j
inc	ecx
cmp	ecx, edx
jl	short loc_435348
mov	al, byte ptr [esp+1Ch+arg_0]
test	al, al
jz	short loc_435381

loc_435368:				; CODE XREF: sub_435240+B5j
					; sub_435240+D6j ...
mov	edx, [esp+1Ch+arg_10]
mov	eax, [esp+1Ch+arg_C]
push	edx
push	eax
push	esi
push	ebp
push	ebx
call	sub_4350A0
add	esp, 14h
mov	byte ptr [esp+1Ch+arg_0], al

loc_435381:				; CODE XREF: sub_435240+CAj
					; sub_435240+E8j ...
mov	ecx, [esp+1Ch+var_8]
xor	bl, bl
mov	[esp+1Ch+arg_4], edi
lea	eax, [edi+ecx]
cmp	edi, eax
mov	[esp+1Ch+var_8], eax
jge	loc_435440
mov	eax, [esp+1Ch+var_C]
mov	edx, [esp+1Ch+var_4]
lea	ecx, [eax+edx]
mov	edx, edi
imul	edx, [esp+1Ch+arg_C]
mov	[esp+1Ch+arg_8], ecx

loc_4353B0:				; CODE XREF: sub_435240+1FAj
cmp	eax, ecx
jge	short loc_435429

loc_4353B4:				; CODE XREF: sub_435240+1E3j
test	eax, eax
jl	short loc_43541C
mov	ecx, [esp+1Ch+arg_4]
test	ecx, ecx
jl	short loc_43541C
cmp	eax, [esp+1Ch+arg_C]
jge	short loc_43541C
cmp	ecx, [esp+1Ch+arg_10]
jge	short loc_43541C
mov	cl, byte ptr [esp+1Ch+arg_0]
test	cl, cl
jz	short loc_4353E5
lea	ecx, [edx+eax]
mov	ebp, ecx
shl	ebp, 4
add	ebp, ecx
mov	byte ptr [esi+ebp*4+40h], 2
jmp	short loc_43541C
; ---------------------------------------------------------------------------

loc_4353E5:				; CODE XREF: sub_435240+192j
mov	cx, word ptr word_7CAFF80
cmp	cx, 0EDh
jz	short loc_43540B
cmp	cx, 0EEh
jz	short loc_43540B
lea	ecx, [edx+eax]
mov	ebp, ecx
shl	ebp, 4
add	ebp, ecx
mov	byte ptr [esi+ebp*4+40h], 3
jmp	short loc_43541C
; ---------------------------------------------------------------------------

loc_43540B:				; CODE XREF: sub_435240+1B1j
					; sub_435240+1B8j
lea	ecx, [edx+eax]
mov	ebx, ecx
shl	ebx, 4
add	ebx, ecx
mov	byte ptr [esi+ebx*4+40h], 4
mov	bl, 1

loc_43541C:				; CODE XREF: sub_435240+176j
					; sub_435240+17Ej ...
mov	ecx, [esp+1Ch+arg_8]
inc	eax
cmp	eax, ecx
jl	short loc_4353B4
mov	eax, [esp+1Ch+var_C]

loc_435429:				; CODE XREF: sub_435240+172j
mov	ebp, [esp+1Ch+arg_4]
add	edx, [esp+1Ch+arg_C]
inc	ebp
cmp	ebp, [esp+1Ch+var_8]
mov	[esp+1Ch+arg_4], ebp
jl	loc_4353B0

loc_435440:				; CODE XREF: sub_435240+154j
mov	al, byte_81C1660
test	al, al
jz	loc_435782
mov	al, byte ptr [esp+1Ch+arg_0]
test	al, al
jz	loc_4356DD
mov	eax, [esp+1Ch+arg_14]
test	eax, eax
jnz	loc_4355A7
imul	edi, [esp+1Ch+arg_C]
mov	eax, [esp+1Ch+var_C]
lea	edx, [edi+eax+0Ch]
mov	eax, dword ptr dword_7CC7FE0
cmp	eax, offset word_7CC6C78
mov	dword ptr dword_7C41D30, edx
jnz	loc_435516
mov	edi, dword ptr dword_7CC4380
xor	bl, bl
cmp	edi, edx
jz	short loc_435496
mov	bl, 1

loc_435496:				; CODE XREF: sub_435240+252j
lea	ecx, [edx-0Ch]
movsx	eax, word ptr word_7CAFF80
mov	esi, ecx
shl	esi, 4
add	esi, ecx
movsx	esi, word ptr word_7CC6C78[esi*4]
cmp	eax, esi
jnz	short loc_4354E7
cmp	eax, 0E0h
jl	short loc_4354D3
cmp	eax, 0E8h
jg	short loc_4354D3
cmp	esi, 0E0h
jl	short loc_4354D3
cmp	esi, 0E8h
jg	short loc_4354D3
mov	bl, 1

loc_4354D3:				; CODE XREF: sub_435240+278j
					; sub_435240+27Fj ...
cmp	eax, 47h
jz	short loc_4354DD
cmp	eax, 4Fh
jnz	short loc_4354E7

loc_4354DD:				; CODE XREF: sub_435240+296j
cmp	esi, 47h
jz	short loc_4354EB
cmp	esi, 4Fh
jz	short loc_4354EB

loc_4354E7:				; CODE XREF: sub_435240+271j
					; sub_435240+29Bj
test	bl, bl
jz	short loc_435505

loc_4354EB:				; CODE XREF: sub_435240+2A0j
					; sub_435240+2A5j
push	edx
push	0
push	edi
push	0
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_435505:				; CODE XREF: sub_435240+2A9j
call	sub_4342D0
mov	al, byte ptr [esp+1Ch+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_435516:				; CODE XREF: sub_435240+242j
cmp	eax, offset byte_7CC4398
jnz	short loc_43553D
mov	ecx, dword ptr dword_7CC4380
push	edx
push	0
push	ecx
push	2
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_43553D:				; CODE XREF: sub_435240+2DBj
cmp	eax, offset byte_7CC8000
push	edx
push	0
jnz	short loc_435564
mov	edx, dword ptr dword_7CC4380
push	edx
push	3
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_435564:				; CODE XREF: sub_435240+305j
mov	eax, dword ptr dword_7CC4380
push	eax
push	1
call	sub_406830
mov	eax, dword ptr dword_7CC7FE0
add	esp, 10h
cmp	eax, offset word_7CC63F0
jnz	loc_435782
mov	al, byte_7CC88AD
test	al, al
jnz	loc_435782
mov	al, byte ptr [esp+1Ch+arg_0]
pop	edi
pop	esi
pop	ebp
mov	dword ptr dword_7CC88B4, 96h
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_4355A7:				; CODE XREF: sub_435240+21Fj
cmp	eax, 1
jnz	short loc_43561C
imul	edi, [esp+1Ch+arg_C]
mov	ecx, [esp+1Ch+var_C]
mov	eax, dword ptr dword_7CC7FE0
add	edi, ecx
cmp	eax, offset word_7CC6C78
mov	dword ptr dword_7C41D30, edi
jnz	short loc_4355FD
push	0
mov	byte_7CC88AD, 0
call	sub_406C50
mov	ecx, dword ptr dword_7C41D30
mov	edx, dword ptr dword_7CC4380
push	ecx
push	1
push	edx
push	0
call	sub_406830
mov	al, byte ptr [esp+30h+arg_0]
add	esp, 14h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_4355FD:				; CODE XREF: sub_435240+387j
mov	eax, dword ptr dword_7CC4380
push	edi
push	1
push	eax
push	1
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_43561C:				; CODE XREF: sub_435240+36Aj
cmp	eax, 2
jnz	short loc_43567B
imul	edi, [esp+1Ch+arg_C]
mov	ecx, [esp+1Ch+var_C]
mov	eax, dword ptr dword_7CC7FE0
add	edi, ecx
cmp	eax, offset word_7CC6C78
push	edi
mov	dword ptr dword_7C41D30, edi
push	2
jnz	short loc_43565E
mov	ecx, dword ptr dword_7CC4380
push	ecx
push	0
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_43565E:				; CODE XREF: sub_435240+3FFj
mov	edx, dword ptr dword_7CC4380
push	edx
push	2
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_43567B:				; CODE XREF: sub_435240+3DFj
cmp	eax, 3
jnz	loc_435782
imul	edi, [esp+1Ch+arg_C]
mov	ecx, [esp+1Ch+var_C]
mov	eax, dword ptr dword_7CC7FE0
add	edi, ecx
cmp	eax, offset word_7CC6C78
push	edi
mov	dword ptr dword_7C41D30, edi
push	3
jnz	short loc_4356C0
mov	eax, dword ptr dword_7CC4380
push	eax
push	0
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_4356C0:				; CODE XREF: sub_435240+462j
mov	ecx, dword ptr dword_7CC4380
push	ecx
push	3
call	sub_406830
mov	al, byte ptr [esp+2Ch+arg_0]
add	esp, 10h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_4356DD:				; CODE XREF: sub_435240+213j
test	bl, bl
jz	loc_435782
mov	eax, [esp+1Ch+arg_14]
test	eax, eax
jnz	loc_435782
mov	ebx, [esp+1Ch+arg_C]
mov	ecx, [esp+1Ch+var_C]
imul	edi, ebx
add	edi, ecx
mov	edx, edi
shl	edx, 4
add	edx, edi
movsx	ecx, word ptr [esi+edx*4]
lea	eax, [esi+edx*4]
mov	dx, word ptr word_7CAFF80
cmp	dx, 0EDh
jz	short loc_435721
cmp	dx, 0EEh
jnz	short loc_435782

loc_435721:				; CODE XREF: sub_435240+4D8j
test	ecx, ecx
jl	short loc_435782
cmp	ecx, 0C2h
jg	short loc_435782
cmp	ecx, 47h
jz	short loc_435782
cmp	ecx, 4Fh
jz	short loc_435782
mov	ecx, [eax+4]
sar	ecx, 3
and	ecx, 0Fh
cmp	dx, 0EDh
jnz	short loc_43574E
cmp	ecx, 7
jge	short loc_435782
jmp	short loc_43575A
; ---------------------------------------------------------------------------

loc_43574E:				; CODE XREF: sub_435240+505j
cmp	dx, 0EEh
jnz	short loc_43575A
cmp	ecx, 9
jge	short loc_435782

loc_43575A:				; CODE XREF: sub_435240+50Cj
					; sub_435240+513j
xor	ecx, ecx
xor	edx, edx
mov	cl, [eax+3Fh]
mov	dl, [eax+3Eh]
imul	ecx, ebx
lea	eax, [ecx+edx+0Ch]
mov	dword ptr dword_7C41D30, eax
push	eax
mov	eax, dword ptr dword_7CC4380
add	eax, 0FFFFFFF4h
push	eax
call	sub_406930
add	esp, 8

loc_435782:				; CODE XREF: sub_435240+207j
					; sub_435240+33Ej ...
mov	al, byte ptr [esp+1Ch+arg_0]
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 0Ch
retn
; ---------------------------------------------------------------------------

loc_43578E:				; CODE XREF: sub_435240+9Dj
					; sub_435240+A5j
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 0Ch
retn
sub_435240 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4357A0 proc	near			; CODE XREF: sub_435840+15p
					; sub_435840+2Ap

var_1= byte ptr	-1
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h

push	ecx
mov	eax, [esp+4+arg_8]
push	ebp
xor	ebp, ebp
mov	[esp+8+var_1], 0
test	eax, eax
jle	loc_435835
push	ebx
push	esi
mov	esi, [esp+10h+arg_0]
push	edi
mov	edi, [esp+14h+arg_4]
mov	[esp+14h+arg_8], esi
mov	ebx, edi
mov	[esp+14h+arg_0], eax
shl	ebx, 4
add	ebx, edi
shl	ebx, 2

loc_4357D2:				; CODE XREF: sub_4357A0+88j
test	edi, edi
jle	short loc_435815

loc_4357D6:				; CODE XREF: sub_4357A0+6Fj
cmp	word ptr [esi],	0FFFFh
jz	short loc_43580B
mov	eax, [esi+38h]
test	eax, eax
jle	short loc_43580B
mov	al, [esp+14h+arg_C]
push	0
test	al, al
push	esi
jz	short loc_4357F5
call	sub_426360
jmp	short loc_4357FA
; ---------------------------------------------------------------------------

loc_4357F5:				; CODE XREF: sub_4357A0+4Cj
call	sub_426010

loc_4357FA:				; CODE XREF: sub_4357A0+53j
add	esp, 8
add	ebp, eax
cmp	word ptr [esi],	0CFh
jnz	short loc_43580B
mov	[esp+14h+var_1], 1

loc_43580B:				; CODE XREF: sub_4357A0+3Aj
					; sub_4357A0+41j ...
add	esi, 44h
dec	edi
jnz	short loc_4357D6
mov	edi, [esp+14h+arg_4]

loc_435815:				; CODE XREF: sub_4357A0+34j
mov	esi, [esp+14h+arg_8]
mov	eax, [esp+14h+arg_0]
add	esi, ebx
dec	eax
mov	[esp+14h+arg_8], esi
mov	[esp+14h+arg_0], eax
jnz	short loc_4357D2
mov	al, [esp+14h+var_1]
pop	edi
pop	esi
pop	ebx
test	al, al
jnz	short loc_43583A

loc_435835:				; CODE XREF: sub_4357A0+Fj
xor	eax, eax
pop	ebp
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_43583A:				; CODE XREF: sub_4357A0+93j
mov	eax, ebp
pop	ebp
pop	ecx
retn
sub_4357A0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_435840 proc	near			; CODE XREF: sub_4370D0+103Bp

var_3= byte ptr	-3
var_2= byte ptr	-2
var_1= byte ptr	-1

push	ecx
mov	al, byte_7CC88C2
test	al, al
jz	short loc_435877
push	0
push	4
push	8
push	offset byte_7CC8000
call	sub_4357A0
push	1
push	4
push	8
push	offset byte_7CC8000
mov	dword ptr dword_7CC3AE8, eax
call	sub_4357A0
add	esp, 20h
mov	dword ptr dword_7CC7FF8, eax

loc_435877:				; CODE XREF: sub_435840+8j
mov	al, byte_7CC88E1
push	ebx
test	al, al
push	esi
jnz	loc_435B08
mov	eax, dword ptr dword_7CAFFB8
test	eax, eax
jle	loc_435B08
mov	eax, dword ptr dword_7CC3AEC
mov	ecx, dword ptr dword_7CC3AF0
push	0
push	8
push	8
add	eax, 0C8h
push	offset word_7CC6C78
add	ecx, 0Fh
push	eax
push	ecx
mov	[esp+24h+var_2], 0
mov	[esp+24h+var_3], 0
xor	bl, bl
call	sub_435240
mov	[esp+24h+var_1], al
mov	al, byte_7CC88C3
add	esp, 18h
test	al, al
jz	short loc_435901
mov	edx, dword ptr dword_7CC3AF4
mov	eax, dword ptr dword_7CC3AF8
push	1
push	4
push	8
add	edx, 10Eh
push	offset word_7CC63F0
add	eax, 0Fh
push	edx
push	eax
call	sub_435240
add	esp, 18h
mov	[esp+0Ch+var_2], al

loc_435901:				; CODE XREF: sub_435840+92j
mov	al, byte_7CC88C1
test	al, al
jz	short loc_435935
mov	ecx, dword ptr dword_7CC8884
mov	edx, dword ptr dword_7CC8880
push	2
push	0Fh
push	8
add	ecx, 32h
push	offset byte_7CC4398
add	edx, 0Fh
push	ecx
push	edx
call	sub_435240
add	esp, 18h
mov	[esp+0Ch+var_3], al

loc_435935:				; CODE XREF: sub_435840+C8j
mov	al, byte_7CC88C2
test	al, al
jz	short loc_435966
mov	eax, dword ptr dword_7CC8884
mov	ecx, dword ptr dword_7CC8880
push	3
push	4
push	8
add	eax, 6Eh
push	offset byte_7CC8000
add	ecx, 0Fh
push	eax
push	ecx
call	sub_435240
add	esp, 18h
mov	bl, al

loc_435966:				; CODE XREF: sub_435840+FCj
mov	al, byte_81C1660
test	al, al
jz	loc_435B08
mov	al, [esp+0Ch+var_1]
mov	byte_81C1660, 0
test	al, al
mov	dword ptr dword_7C41CB8, 0
mov	dword ptr dword_47CE38, 6
jnz	loc_435B08
mov	al, [esp+0Ch+var_3]
test	al, al
jnz	loc_435B08
test	bl, bl
jnz	loc_435B08
mov	al, [esp+0Ch+var_2]
test	al, al
jnz	loc_435B08
mov	bl, byte_7CC88C0
mov	esi, dword ptr dword_7CC8880
mov	edx, dword ptr dword_81C17B4
test	bl, bl
jz	short loc_435A11
lea	eax, [esi+0Fh]
cmp	edx, eax
jl	short loc_435A11
lea	ecx, [esi+0C3h]
cmp	edx, ecx
jge	short loc_435A11
mov	eax, dword ptr dword_7CC8884
mov	ecx, dword ptr dword_81C17B0
push	ebp
lea	ebp, [eax+32h]
cmp	ecx, ebp
pop	ebp
jl	short loc_435A11
add	eax, 172h
cmp	ecx, eax
jge	short loc_435A11
mov	edx, dword ptr dword_7CC4380
push	edx
call	sub_406760
add	esp, 4
pop	esi
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_435A11:				; CODE XREF: sub_435840+18Ej
					; sub_435840+195j ...
mov	cl, byte_7CC88BF
mov	al, 1
test	cl, cl
jz	short loc_435A27
cmp	edx, dword ptr dword_7CC3AF0
jl	short loc_435A27
xor	al, al

loc_435A27:				; CODE XREF: sub_435840+1DBj
					; sub_435840+1E3j
test	bl, bl
jz	short loc_435A31
cmp	edx, esi
jl	short loc_435A31
xor	al, al

loc_435A31:				; CODE XREF: sub_435840+1E9j
					; sub_435840+1EDj
mov	cl, byte_7CC88C1
test	cl, cl
jz	short loc_435A41
cmp	edx, esi
jl	short loc_435A41
xor	al, al

loc_435A41:				; CODE XREF: sub_435840+1F9j
					; sub_435840+1FDj
mov	cl, byte_7CC88C2
test	cl, cl
jz	short loc_435A51
cmp	edx, esi
jl	short loc_435A51
xor	al, al

loc_435A51:				; CODE XREF: sub_435840+209j
					; sub_435840+20Dj
mov	cl, byte_7CC88C3
test	cl, cl
jz	short loc_435A67
cmp	edx, dword ptr dword_7CC3AF8
jge	loc_435B03

loc_435A67:				; CODE XREF: sub_435840+219j
test	al, al
jz	loc_435B03
test	cl, cl
jnz	loc_435B03
push	1				; float
call	sub_43F220
fld dword ptr flt_7EC99C4
push	1
push	1
push	3F800000h
call	__ftol
fld dword ptr flt_7EC99C0
push	eax
call	__ftol
mov	ecx, dword ptr flt_7EC99C0
push	eax
mov	eax, dword ptr flt_7EC99C4
push	eax
push	ecx
call	sub_43D7D0
add	esp, 20h
test	al, al
jz	short loc_435B08
fld dword ptr flt_81C1670
fmul	dword ptr flt_478770
call	__ftol
fld dword ptr flt_81C166C
fmul	dword ptr flt_478770
push	eax
call	__ftol
mov	edx, dword ptr dword_7CC4380
push	eax
push	edx
call	sub_406A90
add	esp, 0Ch
mov	dword ptr dword_7C41CB8, 0
mov	dword ptr dword_47CE38, 6
pop	esi
pop	ebx
pop	ecx
retn
; ---------------------------------------------------------------------------

loc_435B03:				; CODE XREF: sub_435840+221j
					; sub_435840+229j ...
call	sub_4342D0

loc_435B08:				; CODE XREF: sub_435840+40j
					; sub_435840+4Dj ...
pop	esi
pop	ebx
pop	ecx
retn
sub_435840 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_435B10 proc	near			; CODE XREF: sub_436060+17Cp

var_348= dword ptr -348h
var_344= dword ptr -344h
var_340= dword ptr -340h
var_33C= dword ptr -33Ch
var_338= dword ptr -338h
var_334= dword ptr -334h
var_330= dword ptr -330h
var_32C= dword ptr -32Ch
var_328= dword ptr -328h
var_324= dword ptr -324h
var_320= word ptr -320h
var_318= dword ptr -318h
var_314= dword ptr -314h
var_310= dword ptr -310h
var_30C= dword ptr -30Ch
var_2C0= dword ptr -2C0h
var_254= byte ptr -254h
alpha= dword ptr -1C8h
var_1A8= byte ptr -1A8h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= byte ptr	 10h
arg_10=	byte ptr  14h

sub	esp, 348h
mov	eax, [esp+348h+arg_8]
push	ebx
push	ebp
mov	ebp, [esp+350h+arg_4]
fld	dword ptr [eax]
fsub	dword ptr flt_81C17BC
push	esi
push	edi
mov	edi, ebp
xor	ebx, ebx
sar	edi, 3
fstp	[esp+358h+var_338]
fld	dword ptr [eax+4]
fsub	dword ptr flt_81C17C0
and	edi, 0Fh
fstp	[esp+358h+var_334]
fld	dword ptr [eax+8]
fsub	dword ptr flt_81C17C4
cmp	[esp+358h+arg_10], bl
fstp	[esp+358h+var_330]
jz	short loc_435B72
lea	eax, [esp+358h+var_344]
lea	ecx, [esp+358h+var_338]
push	eax
push	ecx
push	3D8F5C29h
jmp	short loc_435B81
; ---------------------------------------------------------------------------

loc_435B72:				; CODE XREF: sub_435B10+4Fj
lea	edx, [esp+358h+var_344]
lea	eax, [esp+358h+var_338]
push	edx				; int
push	eax				; int
push	3DCCCCCDh			; float

loc_435B81:				; CODE XREF: sub_435B10+60j
push	offset flt_81C17BC		; int
call	sub_43F460
mov	esi, [esp+368h+arg_0]
add	esp, 10h
cmp	esi, 1A5h
jz	loc_435D2F
cmp	esi, 1ADh
jz	loc_435D2F
cmp	esi, 1A6h
jl	short loc_435BE0
cmp	esi, 1AEh
jge	short loc_435BE0
mov	dword ptr dword_7CC7D90, 42B40000h
mov	dword ptr dword_7CC7D94, 43340000h
mov	dword ptr dword_7CC7D98, 41A00000h
jmp	loc_435D4D
; ---------------------------------------------------------------------------

loc_435BE0:				; CODE XREF: sub_435B10+A3j
					; sub_435B10+ABj
cmp	esi, 15Eh
jl	short loc_435C31
cmp	esi, 1BEh
jge	short loc_435C39
mov	edx, dword ptr newData3700h1_7BA8518
lea	ecx, [esi+esi*4]
lea	eax, [esi+ecx*2]
lea	ecx, [edx+eax*4]
mov	dl, [eax+ecx-4B14h]
mov	dword ptr dword_7CC7D90, 43340000h
cmp	dl, bl
mov	dword ptr dword_7CC7D94, 43870000h
jz	loc_435D43
mov	dword ptr dword_7CC7D98, 41C80000h
jmp	loc_435D4D
; ---------------------------------------------------------------------------

loc_435C31:				; CODE XREF: sub_435B10+D6j
cmp	esi, 1BEh
jl	short loc_435C64

loc_435C39:				; CODE XREF: sub_435B10+DEj
cmp	esi, 1CEh
jge	short loc_435C64
mov	dword ptr dword_7CC7D90, 43870000h
mov	dword ptr dword_7CC7D94, 43870000h
mov	dword ptr dword_7CC7D98, 0
jmp	loc_435D4D
; ---------------------------------------------------------------------------

loc_435C64:				; CODE XREF: sub_435B10+127j
					; sub_435B10+12Fj
cmp	esi, 23Ah
jl	short loc_435C97
cmp	esi, 23Eh
jge	short loc_435C97
mov	dword ptr dword_7CC7D90, 43B40000h
mov	dword ptr dword_7CC7D94, 0
mov	dword ptr dword_7CC7D98, 0
jmp	loc_435D4D
; ---------------------------------------------------------------------------

loc_435C97:				; CODE XREF: sub_435B10+15Aj
					; sub_435B10+162j
cmp	esi, 24Ah
jnz	short loc_435D0F
mov	eax, edi
sub	eax, ebx
jz	short loc_435CEF
dec	eax
jz	short loc_435CCF
dec	eax
jnz	loc_435D4D
mov	dword ptr dword_7CC7D90, 42B40000h
mov	dword ptr dword_7CC7D94, 0
mov	dword ptr dword_7CC7D98, 0
jmp	short loc_435D4D
; ---------------------------------------------------------------------------

loc_435CCF:				; CODE XREF: sub_435B10+196j
mov	dword ptr dword_7CC7D90, 43870000h
mov	dword ptr dword_7CC7D94, 42B40000h
mov	dword ptr dword_7CC7D98, 0
jmp	short loc_435D4D
; ---------------------------------------------------------------------------

loc_435CEF:				; CODE XREF: sub_435B10+193j
mov	dword ptr dword_7CC7D90, 43340000h
mov	dword ptr dword_7CC7D94, 0
mov	dword ptr dword_7CC7D98, 0
jmp	short loc_435D4D
; ---------------------------------------------------------------------------

loc_435D0F:				; CODE XREF: sub_435B10+18Dj
mov	dword ptr dword_7CC7D90, 43870000h
mov	dword ptr dword_7CC7D94, 0C1200000h
mov	dword ptr dword_7CC7D98, 0
jmp	short loc_435D4D
; ---------------------------------------------------------------------------

loc_435D2F:				; CODE XREF: sub_435B10+8Bj
					; sub_435B10+97j
mov	dword ptr dword_7CC7D90, 0
mov	dword ptr dword_7CC7D94, 43870000h

loc_435D43:				; CODE XREF: sub_435B10+10Cj
mov	dword ptr dword_7CC7D98, 41700000h

loc_435D4D:				; CODE XREF: sub_435B10+CBj
					; sub_435B10+11Cj ...
cmp	[esp+358h+arg_C], bl
jz	short loc_435D68
fld	dword ptr flt_5727448
fmul	dword ptr flt_478928
fstp	dword ptr dword_7CC7D94

loc_435D68:				; CODE XREF: sub_435B10+244j
mov	ax, si
cmp	si, 1CEh
mov	word ptr word_7CC7D7A, ax
jl	short loc_435D8B
cmp	si, 21Eh
jge	short loc_435D8B
mov	ax, 154h
mov	word ptr word_7CC7D7A, ax
jmp	short loc_435DBB
; ---------------------------------------------------------------------------

loc_435D8B:				; CODE XREF: sub_435B10+266j
					; sub_435B10+26Dj
cmp	si, 24Ah
jnz	short loc_435DBB
cmp	edi, ebx
jnz	short loc_435DA7
mov	ax, 272h
mov	esi, 272h
mov	word ptr word_7CC7D7A, ax
jmp	short loc_435DBB
; ---------------------------------------------------------------------------

loc_435DA7:				; CODE XREF: sub_435B10+284j
cmp	edi, 2
jnz	short loc_435DBB
mov	ax, 273h
mov	esi, 273h
mov	word ptr word_7CC7D7A, ax

loc_435DBB:				; CODE XREF: sub_435B10+279j
					; sub_435B10+280j ...
movsx	eax, ax
lea	edx, [eax+eax*2]
shl	edx, 3
sub	edx, eax
cmp	esi, 1CEh
lea	ecx, byte_5729398[edx*8]
mov	[ecx+0A0h], bl
mov	dword ptr dword_7CC7E70, 0
mov	dword ptr dword_7CC7E74, 0
mov	byte_7CC7E6E, bl
jl	short loc_435E09
cmp	esi, 1DEh
jge	short loc_435E11
mov	dword ptr [ecx+84h], 0C3200000h
jmp	short loc_435E63
; ---------------------------------------------------------------------------

loc_435E09:				; CODE XREF: sub_435B10+2E3j
cmp	esi, 1DEh
jl	short loc_435E25

loc_435E11:				; CODE XREF: sub_435B10+2EBj
cmp	esi, 1EEh
jge	short loc_435E25
mov	dword ptr [ecx+84h], 0C2C80000h
jmp	short loc_435E63
; ---------------------------------------------------------------------------

loc_435E25:				; CODE XREF: sub_435B10+2FFj
					; sub_435B10+307j
cmp	esi, 1FEh
jl	short loc_435E41
cmp	esi, 20Eh
jge	short loc_435E41
mov	dword ptr [ecx+84h], 0C28C0000h
jmp	short loc_435E63
; ---------------------------------------------------------------------------

loc_435E41:				; CODE XREF: sub_435B10+31Bj
					; sub_435B10+323j
cmp	esi, 1EEh
jl	short loc_435E5D
cmp	esi, 1FEh
jge	short loc_435E5D
mov	dword ptr [ecx+84h], 0C2480000h
jmp	short loc_435E63
; ---------------------------------------------------------------------------

loc_435E5D:				; CODE XREF: sub_435B10+337j
					; sub_435B10+33Fj
mov	[ecx+84h], ebx

loc_435E63:				; CODE XREF: sub_435B10+2F7j
					; sub_435B10+313j ...
cmp	esi, 1CEh
mov	[esp+358h+var_348], 0
jl	loc_435F00
cmp	esi, 21Eh
jge	loc_435F08
cmp	esi, 1DEh
jge	short loc_435E98
mov	[esp+358h+var_348], 3B7F9724h
jmp	loc_435F88
; ---------------------------------------------------------------------------

loc_435E98:				; CODE XREF: sub_435B10+379j
cmp	esi, 1EEh
jge	short loc_435EAD
mov	[esp+358h+var_348], 3B7F9724h
jmp	loc_435F88
; ---------------------------------------------------------------------------

loc_435EAD:				; CODE XREF: sub_435B10+38Ej
cmp	esi, 1FEh
jl	short loc_435ECA
cmp	esi, 20Eh
jge	short loc_435ECA
mov	[esp+358h+var_348], 3B79096Ch
jmp	loc_435F88
; ---------------------------------------------------------------------------

loc_435ECA:				; CODE XREF: sub_435B10+3A3j
					; sub_435B10+3ABj
cmp	esi, 1EEh
jl	short loc_435EE7
cmp	esi, 1FEh
jge	short loc_435EE7
mov	[esp+358h+var_348], 3B5844D0h
jmp	loc_435F88
; ---------------------------------------------------------------------------

loc_435EE7:				; CODE XREF: sub_435B10+3C0j
					; sub_435B10+3C8j
cmp	esi, 20Eh
jl	loc_435F88
mov	[esp+358h+var_348], 3B51B717h
jmp	loc_435F88
; ---------------------------------------------------------------------------

loc_435F00:				; CODE XREF: sub_435B10+361j
cmp	esi, 21Eh
jl	short loc_435F1A

loc_435F08:				; CODE XREF: sub_435B10+36Dj
cmp	esi, 22Eh
jge	short loc_435F1A
mov	[esp+358h+var_348], 3B03126Fh
jmp	short loc_435F88
; ---------------------------------------------------------------------------

loc_435F1A:				; CODE XREF: sub_435B10+3F6j
					; sub_435B10+3FEj
cmp	esi, 23Eh
jl	short loc_435F34
cmp	esi, 24Eh
jge	short loc_435F34
mov	[esp+358h+var_348], 3B656042h
jmp	short loc_435F88
; ---------------------------------------------------------------------------

loc_435F34:				; CODE XREF: sub_435B10+410j
					; sub_435B10+418j
cmp	esi, 18Eh
jl	short loc_435F4E
cmp	esi, 19Eh
jge	short loc_435F4E
mov	[esp+358h+var_348], 3B09A027h
jmp	short loc_435F88
; ---------------------------------------------------------------------------

loc_435F4E:				; CODE XREF: sub_435B10+42Aj
					; sub_435B10+432j
cmp	esi, 1AEh
jl	short loc_435F68
cmp	esi, 1BEh
jge	short loc_435F68
mov	[esp+358h+var_348], 3B102DE0h
jmp	short loc_435F88
; ---------------------------------------------------------------------------

loc_435F68:				; CODE XREF: sub_435B10+444j
					; sub_435B10+44Cj
cmp	esi, 1A5h
jz	short loc_435F80
cmp	esi, 1ADh
mov	[esp+358h+var_348], 3B23D70Ah
jnz	short loc_435F88

loc_435F80:				; CODE XREF: sub_435B10+45Ej
mov	[esp+358h+var_348], 3AD1B717h

loc_435F88:				; CODE XREF: sub_435B10+383j
					; sub_435B10+398j ...
mov	al, byte_7CC7E6E
mov	edx, dword ptr dword_7CC7E74
push	ebx				; char
push	ebx				; char
push	offset byte_7CC7D9C		; int
push	offset dword_7CC7D90		; int
push	eax				; int
mov	eax, dword ptr dword_7CC7E70
push	edx				; float
push	eax				; float
push	offset dword_688D5A8		; int
call	sub_40F630
lea	ecx, [esp+358h+var_320]
push	ebp
push	ecx
mov	[esp+360h+var_320+2], si
call	sub_444B50
mov	edx, [esp+360h+var_348]
mov	eax, [esp+360h+var_344]
mov	ecx, [esp+360h+var_340]
mov	[esp+360h+var_318], edx
mov	edx, [esp+360h+var_33C]
add	esp, 8
cmp	esi, 24Fh
mov	[esp+358h+var_254], bl
mov	[esp+358h+var_1A8], 2
mov	[esp+358h+var_314], eax
mov	[esp+358h+var_310], ecx
mov	[esp+358h+var_30C], edx
mov	[esp+358h+var_32C], 3F800000h
mov	[esp+358h+var_328], 3F800000h
mov	[esp+358h+var_324], 3F800000h
jl	short loc_436022
cmp	esi, 254h
jg	short loc_436022
mov	[esp+358h+var_2C0], ebx

loc_436022:				; CODE XREF: sub_435B10+501j
					; sub_435B10+509j
mov	eax, [esp+358h+alpha]
push	2				; int
push	ebx				; int
push	1				; int
push	1				; char
push	1				; char
push	ebp				; int
lea	ecx, [esp+370h+var_32C]
push	eax				; alpha
push	ecx				; int
lea	edx, [esp+378h+var_320]
push	esi				; int
push	edx				; int
call	sub_445DF0
add	esp, 28h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 348h
retn
sub_435B10 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_436060(float,	float, float, float, int, int, int)
sub_436060 proc	near			; CODE XREF: sub_42E970+12C0p
					; sub_4367E0+4Bp ...

var_10=	dword ptr -10h
var_C= byte ptr	-0Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	dword ptr  18h
arg_18=	dword ptr  1Ch

sub	esp, 10h
mov	eax, dword ptr dword_7CAFFB8
push	ebx
mov	ebx, [esp+14h+arg_18]
push	esi
test	eax, eax
mov	byte ptr [esp+18h+var_10], 0
jz	short loc_43607B
test	bl, bl
jz	short loc_4360CC

loc_43607B:				; CODE XREF: sub_436060+15j
fild	dword ptr dword_81C17B4
fcom	[esp+18h+arg_0]
fnstsw	ax
test	ah, 1
jnz	short loc_4360CA
fld	[esp+18h+arg_0]
fadd	[esp+18h+arg_8]
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_4360CC
fild	dword ptr dword_81C17B0
fcom	[esp+18h+arg_4]
fnstsw	ax
test	ah, 1
jnz	short loc_4360CA
fld	[esp+18h+arg_4]
fadd	[esp+18h+arg_C]
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_4360CC
mov	byte ptr [esp+18h+var_10], 1
jmp	short loc_4360CC
; ---------------------------------------------------------------------------

loc_4360CA:				; CODE XREF: sub_436060+2Aj
					; sub_436060+4Ej
fstp	st

loc_4360CC:				; CODE XREF: sub_436060+19j
					; sub_436060+3Dj ...
mov	esi, [esp+18h+arg_10]
test	esi, esi
jl	short loc_4360F6
cmp	esi, 10h
jge	short loc_4360FB
fld	[esp+18h+arg_8]
fmul	dword ptr flt_478750
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478938
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_4360F6:				; CODE XREF: sub_436060+72j
cmp	esi, 10h
jl	short loc_43611D

loc_4360FB:				; CODE XREF: sub_436060+77j
cmp	esi, 30h
jge	short loc_436122
fld	[esp+18h+arg_8]
fmul	dword ptr flt_478750
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_4787E4
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_43611D:				; CODE XREF: sub_436060+99j
cmp	esi, 30h
jl	short loc_436141

loc_436122:				; CODE XREF: sub_436060+9Ej
cmp	esi, 40h
jge	short loc_436141
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4787DC
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478934
jmp	short loc_4361AB
; ---------------------------------------------------------------------------

loc_436141:				; CODE XREF: sub_436060+C0j
					; sub_436060+C5j
cmp	esi, 48h
jl	short loc_436165
cmp	esi, 50h
jge	short loc_43616A
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4787E4
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_4787E4
jmp	short loc_4361AB
; ---------------------------------------------------------------------------

loc_436165:				; CODE XREF: sub_436060+E4j
cmp	esi, 50h
jl	short loc_436189

loc_43616A:				; CODE XREF: sub_436060+E9j
cmp	esi, 60h
jge	short loc_43618E
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4787DC
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478930
jmp	short loc_4361AB
; ---------------------------------------------------------------------------

loc_436189:				; CODE XREF: sub_436060+108j
cmp	esi, 60h
jl	short loc_4361EA

loc_43618E:				; CODE XREF: sub_436060+10Dj
cmp	esi, 70h
jge	short loc_4361EF

loc_436193:				; CODE XREF: sub_436060+2A9j
					; sub_436060+2B5j
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_4787DC

loc_4361AB:				; CODE XREF: sub_436060+91j
					; sub_436060+B8j ...
fadd	[esp+18h+arg_4]
lea	eax, [esp+18h+var_C]
push	eax
call	__ftol
push	eax
call	__ftol
push	eax
call	sub_44DF10
mov	ecx, [esp+24h+var_10]
mov	eax, [esp+24h+arg_14]
push	ebx
lea	edx, [esp+28h+var_C]
push	ecx
push	edx
add	esi, 15Eh
push	eax
push	esi
call	sub_435B10
add	esp, 20h
pop	esi
pop	ebx
add	esp, 10h
retn
; ---------------------------------------------------------------------------

loc_4361EA:				; CODE XREF: sub_436060+12Cj
cmp	esi, 70h
jl	short loc_436211

loc_4361EF:				; CODE XREF: sub_436060+131j
cmp	esi, 80h
jge	short loc_436219
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478750
jmp	short loc_4361AB
; ---------------------------------------------------------------------------

loc_436211:				; CODE XREF: sub_436060+18Dj
cmp	esi, 80h
jl	short loc_436284

loc_436219:				; CODE XREF: sub_436060+195j
cmp	esi, 90h
jge	short loc_43628C
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
cmp	esi, 82h
fadd	[esp+18h+arg_0]
jz	short loc_436275
cmp	esi, 84h
jz	short loc_436275
cmp	esi, 86h
jz	short loc_436275
cmp	esi, 83h
jz	short loc_436266
cmp	esi, 88h
jz	short loc_436266
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478750
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_436266:				; CODE XREF: sub_436060+1EDj
					; sub_436060+1F5j
fld	[esp+18h+arg_C]
fmul	dword ptr flt_47892C
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_436275:				; CODE XREF: sub_436060+1D5j
					; sub_436060+1DDj ...
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478884
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_436284:				; CODE XREF: sub_436060+1B7j
cmp	esi, 90h
jl	short loc_4362B1

loc_43628C:				; CODE XREF: sub_436060+1BFj
cmp	esi, 0C0h
jge	short loc_4362B1
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_478844
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_4362B1:				; CODE XREF: sub_436060+22Aj
					; sub_436060+232j
cmp	esi, 0D0h
jl	short loc_4362DE
cmp	esi, 0E0h
jge	short loc_4362DE
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_4787E4
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_4362DE:				; CODE XREF: sub_436060+257j
					; sub_436060+25Fj
cmp	esi, 0ECh
jnz	short loc_436303
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_4786E0
jmp	loc_4361AB
; ---------------------------------------------------------------------------

loc_436303:				; CODE XREF: sub_436060+284j
cmp	esi, 0E0h
jl	loc_436193
cmp	esi, 0F0h
jge	loc_436193
fld	[esp+18h+arg_8]
fmul	dword ptr flt_4786E0
fadd	[esp+18h+arg_0]
fld	[esp+18h+arg_C]
fmul	dword ptr flt_47889C
jmp	loc_4361AB
sub_436060 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_436340 proc	near			; CODE XREF: sub_4370D0+9E8p
					; sub_4370D0+9F6p ...

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	eax, [esp+arg_8]
test	eax, eax
jle	short locret_436390
push	ebx
push	ebp
push	esi
mov	ecx, [esp+0Ch+arg_0]
push	edi
mov	edi, [esp+10h+arg_4]
mov	esi, edi
lea	ebp, [ecx+40h]
shl	esi, 4
add	esi, edi
mov	[esp+10h+arg_8], eax
shl	esi, 2
or	edx, 0FFFFFFFFh

loc_436368:				; CODE XREF: sub_436340+4Aj
test	edi, edi
jle	short loc_43637F
mov	eax, ebp
mov	ecx, edi

loc_436370:				; CODE XREF: sub_436340+3Dj
cmp	[eax-40h], dx
setnz	bl
mov	[eax], bl
add	eax, 44h
dec	ecx
jnz	short loc_436370

loc_43637F:				; CODE XREF: sub_436340+2Aj
mov	eax, [esp+10h+arg_8]
add	ebp, esi
dec	eax
mov	[esp+10h+arg_8], eax
jnz	short loc_436368
pop	edi
pop	esi
pop	ebp
pop	ebx

locret_436390:				; CODE XREF: sub_436340+6j
retn
sub_436340 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4363A0 proc	near			; CODE XREF: sub_436440+27p
					; sub_436440+8Bp ...

arg_0= dword ptr  4

mov	ecx, [esp+arg_0]
xor	eax, eax
mov	al, [ecx+40h]
cmp	eax, 4				; switch 5 cases
ja	short locret_436422		; jumptable 004363AE default case
jmp	ds:off_436424[eax*4]		; switch jump
; ---------------------------------------------------------------------------

loc_4363B5:				; CODE XREF: sub_4363A0+Ej
					; DATA XREF: .text:off_436424o
push	3F800000h			; jumptable 004363AE case 0
push	3F800000h			; green
push	3F800000h			; red
call	ds:glColor3f
retn
; ---------------------------------------------------------------------------

loc_4363CB:				; CODE XREF: sub_4363A0+Ej
					; DATA XREF: .text:off_436424o
push	3F4CCCCDh			; jumptable 004363AE case 1
push	3F4CCCCDh			; green
push	3F4CCCCDh			; red
call	ds:glColor3f
retn
; ---------------------------------------------------------------------------

loc_4363E1:				; CODE XREF: sub_4363A0+Ej
					; DATA XREF: .text:off_436424o
push	3F800000h			; jumptable 004363AE case 2
push	3F333333h			; green
push	3F19999Ah			; red
call	ds:glColor3f
retn
; ---------------------------------------------------------------------------

loc_4363F7:				; CODE XREF: sub_4363A0+Ej
					; DATA XREF: .text:off_436424o
push	3DCCCCCDh			; jumptable 004363AE case 3
push	3E4CCCCDh			; green
push	3F800000h			; red
call	ds:glColor3f
retn
; ---------------------------------------------------------------------------

loc_43640D:				; CODE XREF: sub_4363A0+Ej
					; DATA XREF: .text:off_436424o
push	3F19999Ah			; jumptable 004363AE case 4
push	3F800000h			; green
push	3F000000h			; red
call	ds:glColor3f

locret_436422:				; CODE XREF: sub_4363A0+Cj
retn					; jumptable 004363AE default case
; ---------------------------------------------------------------------------
align 4
off_436424 dd offset loc_4363B5		; DATA XREF: sub_4363A0+Er
dd offset loc_4363CB			; jump table for switch	statement
dd offset loc_4363E1
dd offset loc_4363F7
dd offset loc_43640D
sub_4363A0 endp

align 10h

; =============== S U B	R O U T	I N E =======================================


sub_436440 proc	near			; CODE XREF: sub_439F50+5D4p

var_4C=	dword ptr -4Ch
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 14h
mov	edx, dword ptr newData570h_7B786D4
mov	eax, dword ptr dword_7CC3AF0
mov	ecx, dword ptr dword_7CC3AEC
push	ebx
push	ebp
push	esi
add	edx, 428h
push	edi
push	edx
mov	[esp+28h+var_14], eax
mov	[esp+28h+var_C], ecx
call	sub_4363A0
fild	[esp+28h+var_C]
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
fst	[esp+38h+var_10]
fadd	dword ptr flt_478954
push	0				; int
push	0				; int
push	42200000h			; float
push	42200000h			; float
fstp	[esp+48h+var_C]
fild	[esp+48h+var_14]
mov	esi, [esp+48h+var_C]
push	esi				; float
fst	[esp+4Ch+var_14]
fadd	dword ptr flt_4786D4
fstp	[esp+4Ch+var_8]
mov	ebx, [esp+4Ch+var_8]
push	ebx				; float
push	113h				; texture
call	sub_44EFF0
mov	eax, dword ptr newData570h_7B786D4
add	eax, 3E4h
push	eax
call	sub_4363A0
fld	[esp+58h+var_14]
fadd	dword ptr flt_478950
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F700000h			; float
push	0				; int
push	0				; int
fstp	[esp+70h+var_C]
mov	ecx, [esp+70h+var_C]
push	42200000h			; float
push	42700000h			; float
push	esi				; float
push	ecx				; float
push	112h				; texture
call	sub_44EFF0
mov	edx, dword ptr equNewData570h_7B786CC
add	esp, 60h
cmp	byte ptr [edx+0Bh], 3
jz	short loc_436564
mov	eax, dword ptr newData570h_7B786D4
add	eax, 290h
push	eax
call	sub_4363A0
add	esp, 4
fld	[esp+24h+var_14]
fadd	dword ptr flt_47894C
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	ecx
fstp	[esp+4Ch+var_4C]		; float
push	107h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_436564:				; CODE XREF: sub_436440+D7j
mov	ecx, dword ptr newData570h_7B786D4
add	ecx, 2D4h
push	ecx
call	sub_4363A0
fld	[esp+28h+var_10]
fadd	dword ptr flt_478948
push	1				; float
push	1				; char
push	3F700000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
fstp	[esp+40h+var_8]
fld	[esp+40h+var_14]
fadd	dword ptr flt_47894C
mov	edi, [esp+40h+var_8]
push	42700000h			; float
push	42200000h			; float
push	edi				; float
fstp	[esp+4Ch+var_4]
mov	ebp, [esp+4Ch+var_4]
push	ebp				; float
push	108h				; texture
call	sub_44EFF0
mov	edx, dword ptr newData570h_7B786D4
add	edx, 318h
push	edx
call	sub_4363A0
fld	[esp+58h+var_10]
fadd	dword ptr flt_478944
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
fstp	[esp+70h+var_4]
mov	esi, [esp+70h+var_4]
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	ebp				; float
push	109h				; texture
call	sub_44EFF0
mov	eax, dword ptr newData570h_7B786D4
add	esp, 60h
add	eax, 208h
push	eax
call	sub_4363A0
push	1				; float
push	1				; char
push	3F700000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
push	42700000h			; float
push	42200000h			; float
push	edi				; float
push	ebx				; float
push	10Ah				; texture
call	sub_44EFF0
mov	ecx, dword ptr newData570h_7B786D4
add	ecx, 24Ch
push	ecx
call	sub_4363A0
fld	[esp+58h+var_14]
fadd	dword ptr flt_478940
push	1				; float
push	1				; char
push	3F700000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
fstp	[esp+70h+var_4]
mov	ebp, [esp+70h+var_4]
push	42700000h			; float
push	42200000h			; float
push	edi				; float
push	ebp				; float
push	114h				; texture
call	sub_44EFF0
mov	edx, dword ptr newData570h_7B786D4
add	esp, 60h
add	edx, 35Ch
push	edx
call	sub_4363A0
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	ebx				; float
push	10Bh				; texture
call	sub_44EFF0
mov	eax, dword ptr newData570h_7B786D4
add	eax, 3A0h
push	eax
call	sub_4363A0
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	ebp				; float
push	10Ch				; texture
call	sub_44EFF0
mov	ecx, dword ptr newData570h_7B786D4
add	esp, 60h
add	ecx, 46Ch
push	ecx
call	sub_4363A0
fld	[esp+28h+var_14]
fadd	dword ptr flt_47893C
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
fstp	[esp+40h+var_4]
push	41A00000h			; float
push	41A00000h			; float
push	edi				; float
mov	edi, [esp+4Ch+var_4]
push	edi				; float
push	10Dh				; texture
call	sub_44EFF0
mov	edx, dword ptr newData570h_7B786D4
add	edx, 4B0h
push	edx
call	sub_4363A0
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
push	41A00000h			; float
push	41A00000h			; float
push	esi				; float
push	edi				; float
push	10Eh				; texture
call	sub_44EFF0
mov	eax, dword ptr newData570h_7B786D4
add	esp, 60h
add	eax, 4F4h
push	eax
call	sub_4363A0
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F200000h			; float
push	0				; int
push	0				; int
mov	ecx, [esp+40h+var_C]
push	41A00000h			; float
push	41A00000h			; float
push	esi				; float
push	ecx				; float
push	10Eh				; texture
call	sub_44EFF0
add	esp, 30h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_436440 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_4367E0(int, float, float, float, float)
sub_4367E0 proc	near			; CODE XREF: sub_436840+66p
					; sub_436840+9Bp ...

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_0]
mov	edx, dword ptr newData570h_7B786D4
mov	ecx, eax
shl	ecx, 4
add	ecx, eax
lea	eax, [edx+ecx*4+208h]
mov	cx, [edx+ecx*4+208h]
cmp	cx, 0FFFFh
jz	short locret_436833
mov	edx, [eax+38h]
test	edx, edx
jle	short locret_436833
mov	eax, [eax+4]
mov	edx, [esp+arg_10]
movsx	ecx, cx
push	0				; int
push	eax				; int
mov	eax, [esp+8+arg_C]
push	ecx				; int
mov	ecx, [esp+0Ch+arg_8]
push	edx				; float
mov	edx, [esp+10h+arg_4]
push	eax				; float
push	ecx				; float
push	edx				; float
call	sub_436060
add	esp, 1Ch

locret_436833:				; CODE XREF: sub_4367E0+24j
					; sub_4367E0+2Bj
retn
sub_4367E0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_436840 proc	near			; CODE XREF: sub_43B9D0+9p

var_2C=	dword ptr -2Ch
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4

sub	esp, 10h
mov	edx, dword ptr newData570h_7B786D4
mov	eax, dword ptr dword_7CC3AF0
mov	ecx, dword ptr dword_7CC3AEC
push	ebx
push	ebp
push	esi
add	edx, 428h
push	edi
push	edx
mov	[esp+24h+var_10], eax
mov	[esp+24h+var_8], ecx
call	sub_4363A0
fild	[esp+24h+var_8]
push	42200000h			; float
push	42200000h			; float
fst	[esp+2Ch+var_C]
fadd	dword ptr flt_478954
fstp	[esp+2Ch+var_8]
fild	[esp+2Ch+var_10]
mov	esi, [esp+2Ch+var_8]
push	esi				; float
fst	[esp+30h+var_10]
fadd	dword ptr flt_4786D4
fstp	[esp+30h+var_4]
mov	edi, [esp+30h+var_4]
push	edi				; float
push	8				; int
call	sub_4367E0
mov	eax, dword ptr newData570h_7B786D4
add	eax, 3E4h
push	eax
call	sub_4363A0
fld	[esp+3Ch+var_10]
fadd	dword ptr flt_478950
push	42200000h			; float
push	42700000h			; float
push	esi				; float
fstp	[esp+48h+var_4]
mov	ebp, [esp+48h+var_4]
push	ebp				; float
push	7				; int
call	sub_4367E0
mov	ecx, dword ptr newData570h_7B786D4
add	ecx, 290h
push	ecx
call	sub_4363A0
fld	[esp+54h+var_10]
fadd	dword ptr flt_47894C
push	42200000h			; float
push	42200000h			; float
push	esi				; float
fstp	[esp+60h+var_4]
mov	ebx, [esp+60h+var_4]
push	ebx				; float
push	2				; int
call	sub_4367E0
mov	edx, dword ptr newData570h_7B786D4
add	esp, 48h
add	edx, 2D4h
push	edx
call	sub_4363A0
fld	[esp+24h+var_C]
fadd	dword ptr flt_478948
add	esp, 4
push	42700000h			; float
push	42200000h			; float
fstp	[esp+28h+var_8]
fld	[esp+28h+var_8]
fsub	dword ptr flt_478788
push	ecx
fstp	[esp+2Ch+var_2C]		; float
push	ebx				; float
push	3				; int
call	sub_4367E0
mov	eax, dword ptr newData570h_7B786D4
add	eax, 318h
push	eax
call	sub_4363A0
fld	[esp+38h+var_C]
fadd	dword ptr flt_478944
fstp	[esp+38h+var_4]
mov	esi, [esp+38h+var_4]
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	ebx				; float
push	4				; int
call	sub_4367E0
mov	ecx, dword ptr newData570h_7B786D4
add	ecx, 208h
push	ecx
call	sub_4363A0
mov	ebx, [esp+50h+var_8]
push	42700000h			; float
push	42200000h			; float
push	ebx				; float
push	edi				; float
push	0				; int
call	sub_4367E0
mov	edx, dword ptr newData570h_7B786D4
add	esp, 44h
add	edx, 24Ch
push	edx
call	sub_4363A0
fld	[esp+24h+var_10]
fadd	dword ptr flt_478940
push	42700000h			; float
push	42200000h			; float
push	ebx				; float
fstp	[esp+30h+var_8]
mov	eax, [esp+30h+var_8]
push	eax				; float
push	1				; int
call	sub_4367E0
mov	ecx, dword ptr newData570h_7B786D4
add	ecx, 35Ch
push	ecx
call	sub_4363A0
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	edi				; float
push	5				; int
call	sub_4367E0
mov	edx, dword ptr newData570h_7B786D4
add	edx, 3A0h
push	edx
call	sub_4363A0
mov	eax, [esp+54h+var_8]
push	42200000h			; float
push	42200000h			; float
push	esi				; float
push	eax				; float
push	6				; int
call	sub_4367E0
mov	ecx, dword ptr newData570h_7B786D4
add	esp, 48h
add	ecx, 46Ch
push	ecx
call	sub_4363A0
fld	[esp+24h+var_10]
fadd	dword ptr flt_47893C
push	41A00000h			; float
push	41A00000h			; float
push	ebx				; float
fstp	[esp+30h+var_4]
mov	edi, [esp+30h+var_4]
push	edi				; float
push	9				; int
call	sub_4367E0
mov	edx, dword ptr newData570h_7B786D4
add	edx, 4B0h
push	edx
call	sub_4363A0
push	41A00000h			; float
push	41A00000h			; float
push	esi				; float
push	edi				; float
push	0Ah				; int
call	sub_4367E0
mov	eax, dword ptr newData570h_7B786D4
add	eax, 4F4h
push	eax
call	sub_4363A0
push	41A00000h			; float
push	41A00000h			; float
push	esi				; float
push	ebp				; float
push	0Bh				; int
call	sub_4367E0
add	esp, 48h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 10h
retn
sub_436840 endp


; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_436AD0(float,	float, float, int, int)
sub_436AD0 proc	near			; CODE XREF: sub_439F50+602p
					; sub_439F50+8A7p ...

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

mov	eax, [esp+arg_10]
sub	esp, 8
test	eax, eax
jle	loc_436BBD
push	ebx
push	ebp
mov	ebp, [esp+10h+arg_8]
push	esi
push	edi
mov	[esp+18h+var_8], 0
mov	[esp+18h+var_4], eax

loc_436AF3:				; CODE XREF: sub_436AD0+E3j
mov	ebx, [esp+18h+arg_C]
test	ebx, ebx
jle	loc_436B99
fild	[esp+18h+var_8]
mov	[esp+18h+arg_10], 0
mov	edi, ebp
fadd	[esp+18h+arg_4]
fstp	[esp+18h+arg_8]
mov	esi, [esp+18h+arg_8]

loc_436B19:				; CODE XREF: sub_436AD0+C7j
fild	[esp+18h+arg_10]
push	edi
fadd	[esp+1Ch+arg_0]
fstp	[esp+1Ch+arg_8]
call	sub_4363A0
add	esp, 4
cmp	word ptr [edi],	0FFFFh
push	1				; float
push	1				; char
jz	short loc_436B5D
mov	eax, [esp+20h+arg_8]
push	3F2AAAABh
push	3F200000h
push	0
push	0
push	41A00000h
push	41A00000h
push	esi
push	eax
push	116h
jmp	short loc_436B80
; ---------------------------------------------------------------------------

loc_436B5D:				; CODE XREF: sub_436AD0+66j
mov	ecx, [esp+20h+arg_8]
push	3F800000h			; float
push	3F800000h			; float
push	0				; int
push	0				; int
push	41A00000h			; float
push	41A00000h			; float
push	esi				; float
push	ecx				; float
push	115h				; texture

loc_436B80:				; CODE XREF: sub_436AD0+8Bj
call	sub_44EFF0
mov	ecx, [esp+44h+arg_10]
add	esp, 2Ch
add	edi, 44h
add	ecx, 14h
dec	ebx
mov	[esp+18h+arg_10], ecx
jnz	short loc_436B19

loc_436B99:				; CODE XREF: sub_436AD0+29j
mov	edx, [esp+18h+var_8]
mov	eax, [esp+18h+var_4]
add	edx, 14h
add	ebp, 220h
dec	eax
mov	[esp+18h+var_8], edx
mov	[esp+18h+var_4], eax
jnz	loc_436AF3
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_436BBD:				; CODE XREF: sub_436AD0+9j
add	esp, 8
retn
sub_436AD0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_436BD0(float,	float, int, int, float,	char)
sub_436BD0 proc	near			; CODE XREF: sub_43B9D0+39p
					; sub_43B9D0+75p ...

var_4C=	dword ptr -4Ch
var_48=	dword ptr -48h
red= dword ptr -44h
green= dword ptr -40h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
var_18=	dword ptr -18h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h
arg_14=	byte ptr  18h

mov	eax, [esp+arg_10]
sub	esp, 28h
test	eax, eax
jle	loc_436ED8
push	ebx
push	ebp
push	esi
mov	esi, [esp+34h+arg_8]
push	edi
mov	[esp+38h+var_1C], 0
mov	[esp+38h+var_10], esi
mov	[esp+38h+var_C], eax

loc_436BF7:				; CODE XREF: sub_436BD0+2FEj
mov	eax, [esp+38h+arg_C]
test	eax, eax
jle	loc_436EAC
fild	[esp+38h+var_1C]
mov	[esp+38h+var_20], 0
mov	[esp+38h+var_18], esi
mov	[esp+38h+var_14], eax
fadd	[esp+38h+arg_4]
fstp	[esp+38h+var_28]

loc_436C1F:				; CODE XREF: sub_436BD0+2D6j
fild	[esp+38h+var_20]
mov	ax, [esi]
cmp	ax, 0FFFFh
fadd	[esp+38h+arg_0]
fstp	[esp+38h+arg_10]
jz	loc_436E8B
mov	ecx, [esi+38h]
test	ecx, ecx
jle	loc_436CFF
mov	cl, [esp+38h+arg_14]
test	cl, cl
jnz	short loc_436CAB
movsx	eax, ax
mov	edx, dword ptr newData3700h1_7BA8518
push	0				; int
lea	ecx, [eax+eax*4]
lea	ecx, [eax+ecx*2]
lea	edx, [edx+ecx*4]
add	ecx, edx
mov	edx, [esi+4]
push	edx				; int
push	eax				; int
xor	eax, eax
xor	edx, edx
mov	al, [ecx+21h]
mov	dl, [ecx+20h]
mov	[esp+44h+var_18], eax
push	ecx
fild	[esp+48h+var_18]
mov	[esp+48h+var_18], edx
mov	eax, [esp+48h+var_28]
fmul	dword ptr flt_478710
fstp	[esp+48h+var_48]		; float
fild	[esp+48h+var_18]
push	ecx
mov	ecx, [esp+4Ch+arg_10]
fmul	dword ptr flt_478710
fstp	[esp+4Ch+var_4C]		; float
push	eax				; float
push	ecx				; float
call	sub_436060
add	esp, 1Ch
jmp	loc_436E8B
; ---------------------------------------------------------------------------

loc_436CAB:				; CODE XREF: sub_436BD0+79j
cmp	ax, 0E0h
jl	short loc_436CFF
cmp	ax, 0E8h
jg	short loc_436CFF
cmp	byte ptr [esi+1Ah], 1
jbe	short loc_436CFF
push	3F333333h			; blue
push	3F666666h			; green
push	3F800000h			; red
call	ds:glColor3f
fld	[esp+38h+arg_10]
mov	eax, [esp+38h+var_28]
xor	edx, edx
mov	dl, [esi+1Ah]
push	41200000h			; float
fadd	dword ptr flt_478958
push	41100000h			; float
push	edx				; int
push	eax				; float
push	ecx
fstp	[esp+4Ch+var_4C]		; float
call	sub_44ED50
fstp	st
add	esp, 14h

loc_436CFF:				; CODE XREF: sub_436BD0+6Dj
					; sub_436BD0+DFj ...
mov	al, [esp+38h+arg_14]
test	al, al
jz	loc_436E8B
cmp	[esp+38h+arg_8], offset	byte_7CC8000
jnz	loc_436E8B
mov	eax, dword ptr dword_7CC88C8
test	eax, eax
jle	loc_436E8B
cmp	eax, 32h
jge	loc_436E8B
call	sub_44E2D0
push	3E4CCCCDh			; blue
call	_rand
and	eax, 80000003h
jns	short loc_436D4A
dec	eax
or	eax, 0FFFFFFFCh
inc	eax

loc_436D4A:				; CODE XREF: sub_436BD0+173j
add	eax, 4
push	ecx
mov	[esp+40h+var_24], eax
fild	[esp+40h+var_24]
fmul	dword ptr flt_478700
fstp	[esp+40h+green]			; green
call	_rand
cdq
mov	ecx, 6
idiv	ecx
push	ecx
add	edx, ecx
mov	[esp+44h+var_24], edx
fild	[esp+44h+var_24]
fmul	dword ptr flt_478700
fstp	[esp+44h+red]			; red
call	ds:glColor3f
fld	dword ptr flt_5727448
call	__ftol
cdq
mov	ecx, 64h
idiv	ecx
mov	[esp+38h+var_24], edx
fild	[esp+38h+var_24]
fmul	dword ptr flt_478710
fstp	[esp+38h+var_4]
call	_rand
cdq
mov	ecx, 0Ah
idiv	ecx
mov	[esp+38h+var_24], edx
fild	[esp+38h+var_24]
fadd	dword ptr flt_478764
fstp	[esp+38h+var_24]
call	_rand
cdq
mov	ecx, 14h
idiv	ecx
mov	[esp+38h+var_8], edx
fild	[esp+38h+var_8]
fadd	[esp+38h+arg_10]
fstp	[esp+38h+var_8]
call	_rand
cdq
mov	ecx, 14h
mov	esi, [esp+38h+var_24]
idiv	ecx
mov	ebp, [esp+38h+var_8]
push	0				; int
push	esi				; float
push	esi				; float
mov	[esp+44h+arg_10], edx
fild	[esp+44h+arg_10]
fadd	[esp+44h+var_28]
fstp	[esp+44h+arg_10]
mov	edi, [esp+44h+arg_10]
push	edi				; float
push	ebp				; float
push	49Ch				; texture
call	sub_44F130
mov	ebx, [esp+50h+var_4]
push	ebx				; int
push	esi				; float
push	esi				; float
push	edi				; float
push	ebp				; float
push	49Ch				; texture
call	sub_44F130
fld	[esp+68h+var_24]
fmul	dword ptr flt_478778
push	ebx				; int
fstp	[esp+6Ch+arg_10]
mov	eax, [esp+6Ch+arg_10]
push	eax				; float
push	eax				; float
push	edi				; float
push	ebp				; float
push	49Dh				; texture
call	sub_44F130
fld	[esp+80h+var_24]
add	esp, 48h
fmul	dword ptr flt_4787A8
push	0				; int
fstp	[esp+3Ch+arg_10]
mov	eax, [esp+3Ch+arg_10]
push	eax				; float
push	eax				; float
push	edi				; float
push	ebp				; float
push	44Ch				; texture
call	sub_44F130
add	esp, 18h
call	sub_44E1C0
mov	esi, [esp+38h+var_18]

loc_436E8B:				; CODE XREF: sub_436BD0+62j
					; sub_436BD0+D6j ...
mov	ecx, [esp+38h+var_20]
mov	eax, [esp+38h+var_14]
add	esi, 44h
add	ecx, 14h
dec	eax
mov	[esp+38h+var_18], esi
mov	[esp+38h+var_20], ecx
mov	[esp+38h+var_14], eax
jnz	loc_436C1F

loc_436EAC:				; CODE XREF: sub_436BD0+2Dj
mov	edx, [esp+38h+var_1C]
mov	esi, [esp+38h+var_10]
mov	eax, [esp+38h+var_C]
add	edx, 14h
add	esi, 220h
dec	eax
mov	[esp+38h+var_1C], edx
mov	[esp+38h+var_10], esi
mov	[esp+38h+var_C], eax
jnz	loc_436BF7
pop	edi
pop	esi
pop	ebp
pop	ebx

loc_436ED8:				; CODE XREF: sub_436BD0+9j
mov	eax, dword ptr dword_7CC88C8
test	eax, eax
jle	short loc_436EE7
inc	eax
mov	dword ptr dword_7CC88C8, eax

loc_436EE7:				; CODE XREF: sub_436BD0+30Fj
add	esp, 28h
retn
sub_436BD0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_436EF0 proc	near			; CODE XREF: sub_407310+Ap

arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

mov	ecx, [esp+arg_8]
mov	al, 1
test	ecx, ecx
jle	short locret_436F37
push	ebx
push	ebp
push	esi
push	edi
mov	edi, [esp+10h+arg_4]
mov	ebp, [esp+10h+arg_0]
mov	esi, edi
mov	ebx, ecx
shl	esi, 4
add	esi, edi
shl	esi, 2

loc_436F12:				; CODE XREF: sub_436EF0+41j
test	edi, edi
jle	short loc_436F2E
mov	ecx, ebp
mov	edx, edi

loc_436F1A:				; CODE XREF: sub_436EF0+3Cj
cmp	word ptr [ecx],	0FFFFh
jz	short loc_436F28
cmp	dword ptr [ecx+38h], 0
jle	short loc_436F28
xor	al, al

loc_436F28:				; CODE XREF: sub_436EF0+2Ej
					; sub_436EF0+34j
add	ecx, 44h
dec	edx
jnz	short loc_436F1A

loc_436F2E:				; CODE XREF: sub_436EF0+24j
add	ebp, esi
dec	ebx
jnz	short loc_436F12
pop	edi
pop	esi
pop	ebp
pop	ebx

locret_436F37:				; CODE XREF: sub_436EF0+8j
retn
sub_436EF0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_436F40 proc	near			; CODE XREF: sub_4370D0+BFEp

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_8]
push	ebx
xor	edx, edx
push	ebp
lea	ecx, [eax-3]
push	esi
cmp	ecx, edx
push	edi
mov	[esp+18h+var_8], edx
mov	[esp+18h+var_4], ecx
jle	loc_436FE7
mov	ebx, [esp+18h+arg_4]
mov	[esp+18h+arg_4], edx

loc_436F68:				; CODE XREF: sub_436F40+A5j
lea	eax, [ebx-4]
mov	[esp+18h+arg_8], edx
cmp	eax, edx
jle	short loc_436FD0

loc_436F73:				; CODE XREF: sub_436F40+88j
mov	ecx, [esp+18h+arg_4]
mov	esi, [esp+18h+arg_8]
mov	eax, ebx
add	ecx, esi
shl	eax, 4
mov	esi, ecx
add	eax, ebx
shl	esi, 4
shl	eax, 2
add	esi, ecx
mov	ecx, [esp+18h+arg_0]
mov	dl, 1
mov	ebp, 4
lea	edi, [ecx+esi*4]

loc_436F9C:				; CODE XREF: sub_436F40+74j
mov	ecx, edi
mov	esi, 5

loc_436FA3:				; CODE XREF: sub_436F40+6Fj
cmp	word ptr [ecx],	0FFFFh
jz	short loc_436FAB
xor	dl, dl

loc_436FAB:				; CODE XREF: sub_436F40+67j
add	ecx, 44h
dec	esi
jnz	short loc_436FA3
add	edi, eax
dec	ebp
jnz	short loc_436F9C
test	dl, dl
jnz	short loc_436FF1
mov	eax, [esp+18h+arg_8]
lea	ecx, [ebx-4]
inc	eax
cmp	eax, ecx
mov	[esp+18h+arg_8], eax
jl	short loc_436F73
mov	ecx, [esp+18h+var_4]
xor	edx, edx

loc_436FD0:				; CODE XREF: sub_436F40+31j
mov	eax, [esp+18h+var_8]
mov	edi, [esp+18h+arg_4]
inc	eax
add	edi, ebx
cmp	eax, ecx
mov	[esp+18h+var_8], eax
mov	[esp+18h+arg_4], edi
jl	short loc_436F68

loc_436FE7:				; CODE XREF: sub_436F40+1Aj
pop	edi
pop	esi
pop	ebp
xor	al, al
pop	ebx
add	esp, 8
retn
; ---------------------------------------------------------------------------

loc_436FF1:				; CODE XREF: sub_436F40+78j
pop	edi
pop	esi
pop	ebp
mov	al, 1
pop	ebx
add	esp, 8
retn
sub_436F40 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_437000 proc	near			; CODE XREF: sub_4370D0+BD3p

var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

sub	esp, 8
mov	eax, [esp+8+arg_8]
xor	ecx, ecx
cmp	eax, ecx
mov	[esp+8+var_8], ecx
mov	[esp+8+var_4], ecx
jle	loc_4370C4
push	ebx
mov	ebx, [esp+0Ch+arg_4]
mov	ecx, [esp+0Ch+arg_0]
push	ebp
mov	ebp, ebx
push	esi
shl	ebp, 4
add	ebp, ebx
push	edi
shl	ebp, 2
add	ecx, 24h
mov	[esp+18h+arg_4], eax
mov	[esp+18h+arg_8], ecx

loc_43703A:				; CODE XREF: sub_437000+A8j
test	ebx, ebx
jle	short loc_437095
mov	edi, ebx

loc_437040:				; CODE XREF: sub_437000+93j
mov	ax, [ecx-24h]
cmp	ax, 0FFFFh
jz	short loc_43708F
mov	edx, [ecx+14h]
test	edx, edx
jle	short loc_43708F
cmp	ax, 0CFh
jnz	short loc_43705D
inc	[esp+18h+var_8]
jmp	short loc_43708F
; ---------------------------------------------------------------------------

loc_43705D:				; CODE XREF: sub_437000+55j
cmp	ax, 0C0h
jge	short loc_43708F
mov	edx, [ecx-20h]
and	edx, 78h
cmp	dl, 20h
jl	short loc_43708F
xor	eax, eax
xor	edx, edx
mov	al, [ecx]
mov	esi, eax
test	esi, esi
jle	short loc_43708F

loc_43707A:				; CODE XREF: sub_437000+8Dj
mov	al, [ecx+edx+1]
cmp	al, 3Ch
jb	short loc_43708A
cmp	al, 3Fh
ja	short loc_43708A
inc	[esp+18h+var_4]

loc_43708A:				; CODE XREF: sub_437000+80j
					; sub_437000+84j
inc	edx
cmp	edx, esi
jl	short loc_43707A

loc_43708F:				; CODE XREF: sub_437000+48j
					; sub_437000+4Fj ...
add	ecx, 44h
dec	edi
jnz	short loc_437040

loc_437095:				; CODE XREF: sub_437000+3Cj
mov	ecx, [esp+18h+arg_8]
mov	eax, [esp+18h+arg_4]
add	ecx, ebp
dec	eax
mov	[esp+18h+arg_8], ecx
mov	[esp+18h+arg_4], eax
jnz	short loc_43703A
mov	eax, [esp+18h+var_8]
pop	edi
pop	esi
pop	ebp
test	eax, eax
pop	ebx
jle	short loc_4370C4
mov	eax, [esp+8+var_4]
test	eax, eax
jle	short loc_4370C4
mov	al, 1
add	esp, 8
retn
; ---------------------------------------------------------------------------

loc_4370C4:				; CODE XREF: sub_437000+13j
					; sub_437000+B4j ...
xor	al, al
add	esp, 8
retn
sub_437000 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4370D0 proc	near			; CODE XREF: sub_455310:loc_455416p

var_29=	byte ptr -29h
var_28=	dword ptr -28h
var_24=	dword ptr -24h
var_20=	byte ptr -20h

mov	eax, dword ptr dword_81C498C
sub	esp, 2Ch
cmp	eax, 6Eh
jz	loc_438110
mov	al, byte_7CC88C4
mov	edx, dword ptr dword_81C17B4
push	ebx
push	ebp
push	esi
push	edi
test	al, al
jz	loc_437475
mov	eax, dword ptr dword_7CC4384
mov	ecx, dword ptr dword_81C17B0
mov	esi, dword ptr dword_7CC4388
cmp	edx, eax
jl	short loc_43712B
add	eax, 0BEh
cmp	edx, eax
jge	short loc_43712B
cmp	ecx, esi
jl	short loc_43712B
add	esi, 1B1h
cmp	ecx, esi
jge	short loc_43712B
mov	byte_7BA8544, 1

loc_43712B:				; CODE XREF: sub_4370D0+3Bj
					; sub_4370D0+44j ...
cmp	dword_7CC88CC, 1
jnz	loc_43723F
mov	eax, dword ptr dword_79DBE88
mov	esi, offset byte_7CC3AA5
mov	dword ptr [eax+20h], 42E10000h
mov	ecx, dword ptr dword_7CC4388
mov	edx, dword ptr dword_81C17B4
mov	ebp, dword ptr dword_81C17B0
mov	bl, byte ptr dword_7CC8898
lea	edi, [ecx+64h]

loc_437164:				; CODE XREF: sub_4370D0+EFj
mov	ecx, dword ptr dword_7CC4384
xor	eax, eax
add	ecx, 32h

loc_43716F:				; CODE XREF: sub_4370D0+E1j
cmp	edx, ecx
jl	short loc_4371AA
lea	edx, [ecx+0Fh]
cmp	dword ptr dword_81C17B4, edx
jge	short loc_4371A4
cmp	ebp, edi
jl	short loc_4371A4
lea	edx, [edi+0Fh]
cmp	ebp, edx
jge	short loc_4371A4
mov	dl, byte_81C17F8
test	dl, dl
jz	short loc_437196
mov	[esi+eax], bl

loc_437196:				; CODE XREF: sub_4370D0+C1j
mov	dl, byte_81C17E4
test	dl, dl
jz	short loc_4371A4
mov	byte ptr [esi+eax], 0

loc_4371A4:				; CODE XREF: sub_4370D0+ACj
					; sub_4370D0+B0j ...
mov	edx, dword ptr dword_81C17B4

loc_4371AA:				; CODE XREF: sub_4370D0+A1j
inc	eax
add	ecx, 0Fh
cmp	eax, 8
jl	short loc_43716F
add	esi, 8
add	edi, 0Fh
cmp	esi, offset unk_7CC3AE5
jl	short loc_437164
xor	ebp, ebp
mov	ebx, 104h

loc_4371C8:				; CODE XREF: sub_4370D0+16Dj
xor	edi, edi
xor	esi, esi

loc_4371CC:				; CODE XREF: sub_4370D0+15Fj
mov	eax, dword ptr dword_7CC4384
mov	ecx, dword ptr dword_7CC4388
add	ecx, ebx
lea	eax, [esi+eax+0Fh]
cmp	edx, eax
jl	short loc_437225
add	eax, 14h
cmp	edx, eax
jge	short loc_437225
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_437225
add	ecx, 14h
cmp	eax, ecx
jge	short loc_437225
mov	al, byte_81C1660
test	al, al
jz	short loc_437225
push	0
push	0
push	19h
mov	byte_81C1660, 0
call	sub_401570
lea	edx, [edi+ebp]
add	esp, 0Ch
mov	dword ptr dword_7CC8898, edx
mov	edx, dword ptr dword_81C17B4

loc_437225:				; CODE XREF: sub_4370D0+10Fj
					; sub_4370D0+116j ...
add	esi, 14h
inc	edi
cmp	esi, 0A0h
jl	short loc_4371CC
add	ebx, 14h
add	ebp, 8
cmp	ebx, 12Ch
jl	short loc_4371C8

loc_43723F:				; CODE XREF: sub_4370D0+62j
mov	eax, dword ptr dword_7CC4384
mov	ecx, dword ptr dword_7CC4388
add	eax, 14h
add	ecx, 15Eh
cmp	edx, eax
jl	loc_437399
add	eax, 46h
cmp	edx, eax
jge	loc_437399
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	loc_437399
add	ecx, 15h
cmp	eax, ecx
jge	loc_437399
mov	al, byte_81C1660
test	al, al
jz	loc_437399
mov	eax, dword ptr dword_7CC88CC
mov	byte_81C1660, 0
test	eax, eax
jnz	short loc_4372AA
push	1
call	sub_406F20
add	esp, 4
jmp	loc_437385
; ---------------------------------------------------------------------------

loc_4372AA:				; CODE XREF: sub_4370D0+1C9j
call	sub_44FDE0
test	al, al
jz	short loc_4372C2
mov	dword ptr dword_81C498C, 73h
jmp	loc_437385
; ---------------------------------------------------------------------------

loc_4372C2:				; CODE XREF: sub_4370D0+1E1j
push	offset dword_7BE8BC0		; unsigned __int8 *
call	sub_44FD80
add	esp, 4
test	al, al
jz	short loc_4372E2
mov	dword ptr dword_81C498C, 7Bh
jmp	loc_437385
; ---------------------------------------------------------------------------

loc_4372E2:				; CODE XREF: sub_4370D0+201j
mov	[esp+3Ch+var_29], 0
xor	esi, esi

loc_4372E9:				; CODE XREF: sub_4370D0+268j
mov	edx, esi
and	edx, 80000001h
jns	short loc_4372F8
dec	edx
or	edx, 0FFFFFFFEh
inc	edx

loc_4372F8:				; CODE XREF: sub_4370D0+221j
jnz	short loc_437312
mov	cl, byte_7CC3AA5[esi]
mov	eax, esi
cdq
mov	bl, cl
sub	eax, edx
shl	bl, 4
sar	eax, 1
mov	[esp+eax+3Ch+var_20], bl
jmp	short loc_43732B
; ---------------------------------------------------------------------------

loc_437312:				; CODE XREF: sub_4370D0:loc_4372F8j
mov	eax, esi
mov	cl, byte_7CC3AA5[esi]
cdq
sub	eax, edx
sar	eax, 1
mov	dl, [esp+eax+3Ch+var_20]
lea	eax, [esp+eax+3Ch+var_20]
add	dl, cl
mov	[eax], dl

loc_43732B:				; CODE XREF: sub_4370D0+240j
test	cl, cl
jz	short loc_437334
mov	[esp+3Ch+var_29], 1

loc_437334:				; CODE XREF: sub_4370D0+25Dj
inc	esi
cmp	esi, 40h
jl	short loc_4372E9
mov	al, [esp+3Ch+var_29]
test	al, al
jnz	short loc_43734E
mov	dword ptr dword_81C498C, 7Fh
jmp	short loc_437385
; ---------------------------------------------------------------------------

loc_43734E:				; CODE XREF: sub_4370D0+270j
mov	edi, offset dword_7BE8BC0
or	ecx, 0FFFFFFFFh
xor	eax, eax
repne scasb
not	ecx
sub	edi, ecx
mov	eax, ecx
mov	esi, edi
mov	edi, offset byte_7CC3A9C
shr	ecx, 2
rep movsd
mov	ecx, eax
and	ecx, 3
rep movsb
lea	ecx, [esp+3Ch+var_20]
push	ecx
push	offset byte_7CC3A9C
call	sub_406F60
add	esp, 8

loc_437385:				; CODE XREF: sub_4370D0+1D5j
					; sub_4370D0+1EDj ...
push	0
push	0
push	19h
call	sub_401570
mov	edx, dword ptr dword_81C17B4
add	esp, 0Ch

loc_437399:				; CODE XREF: sub_4370D0+185j
					; sub_4370D0+190j ...
mov	eax, dword ptr dword_7CC4384
mov	ecx, dword ptr dword_7CC4388
add	eax, 64h
add	ecx, 15Eh
cmp	edx, eax
jl	loc_437475
add	eax, 46h
cmp	edx, eax
jge	loc_437475
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	loc_437475
add	ecx, 15h
cmp	eax, ecx
jge	loc_437475
mov	al, byte_81C1660
test	al, al
jz	loc_437475
mov	eax, dword ptr dword_7CC88CC
mov	byte_81C1660, 0
test	eax, eax
jnz	short loc_437402
xor	esi, esi
push	esi
call	sub_406F20
add	esp, 4
jmp	short loc_437418
; ---------------------------------------------------------------------------

loc_437402:				; CODE XREF: sub_4370D0+323j
call	sub_4070A0
mov	edx, dword ptr dword_79DBE88
xor	esi, esi
mov	word ptr [edx+194h], 0FFFFh

loc_437418:				; CODE XREF: sub_4370D0+330j
push	esi
push	esi
push	19h
call	sub_401570
xor	eax, eax
push	esi
mov	dword ptr dword_7BE8BC0, eax
push	esi
mov	dword ptr dword_7BE8BC4, eax
push	1Ch
mov	word ptr word_7BE8BC8, ax
mov	dword ptr dword_7BA8558, esi
mov	dword ptr dword_47CEC8, 0Ah
mov	byte_7C41CEF, al
mov	byte_7CC88C4, al
mov	dword ptr dword_7CC88CC, esi
call	sub_401570
mov	edx, dword ptr dword_81C17B4
add	esp, 18h
mov	dword ptr dword_7C41CB8, esi
mov	dword ptr dword_47CE38, 6

loc_437475:				; CODE XREF: sub_4370D0+22j
					; sub_4370D0+2DFj ...
mov	al, byte_7CC88BC
test	al, al
jz	loc_43768A
mov	esi, dword ptr dword_7CB0044
mov	edi, dword ptr dword_7CB0040
cmp	edx, esi
jl	short loc_4374B6
lea	ecx, [esi+0BEh]
cmp	edx, ecx
jge	short loc_4374B6
mov	eax, dword ptr dword_81C17B0
cmp	eax, edi
jl	short loc_4374B6
lea	ecx, [edi+1B1h]
cmp	eax, ecx
jge	short loc_4374B6
mov	byte_7BA8544, 1

loc_4374B6:				; CODE XREF: sub_4370D0+3C0j
					; sub_4370D0+3CAj ...
mov	eax, dword ptr dword_7CC888C
mov	ecx, eax
cmp	eax, 0Fh
mov	[esp+3Ch+var_24], ecx
jl	short loc_4374CF
mov	ecx, 0Fh
mov	[esp+3Ch+var_24], ecx

loc_4374CF:				; CODE XREF: sub_4370D0+3F4j
xor	ebp, ebp
cmp	ecx, ebp
jle	loc_43761C
mov	[esp+3Ch+var_28], ebp

loc_4374DD:				; CODE XREF: sub_4370D0+53Aj
mov	eax, dword ptr dword_79DBE88
lea	esi, [eax+17Ch]
mov	eax, offset byte_7CB0048
mov	edi, esi

loc_4374EF:				; CODE XREF: sub_4370D0+43Dj
mov	bl, [eax]
mov	cl, bl
cmp	bl, [edi]
jnz	short loc_437513
test	cl, cl
jz	short loc_43750F
mov	bl, [eax+1]
mov	cl, bl
cmp	bl, [edi+1]
jnz	short loc_437513
add	eax, 2
add	edi, 2
test	cl, cl
jnz	short loc_4374EF

loc_43750F:				; CODE XREF: sub_4370D0+429j
xor	eax, eax
jmp	short loc_437518
; ---------------------------------------------------------------------------

loc_437513:				; CODE XREF: sub_4370D0+425j
					; sub_4370D0+433j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_437518:				; CODE XREF: sub_4370D0+441j
test	eax, eax
jz	short loc_437560
mov	ecx, dword ptr dword_7CC8888
lea	eax, [ecx+ebp]
lea	eax, [eax+eax*2]
lea	eax, byte_7CB0048[eax*4]

loc_43752F:				; CODE XREF: sub_4370D0+47Dj
mov	bl, [eax]
mov	cl, bl
cmp	bl, [esi]
jnz	short loc_437553
test	cl, cl
jz	short loc_43754F
mov	bl, [eax+1]
mov	cl, bl
cmp	bl, [esi+1]
jnz	short loc_437553
add	eax, 2
add	esi, 2
test	cl, cl
jnz	short loc_43752F

loc_43754F:				; CODE XREF: sub_4370D0+469j
xor	eax, eax
jmp	short loc_437558
; ---------------------------------------------------------------------------

loc_437553:				; CODE XREF: sub_4370D0+465j
					; sub_4370D0+473j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_437558:				; CODE XREF: sub_4370D0+481j
test	eax, eax
jnz	loc_4375F8

loc_437560:				; CODE XREF: sub_4370D0+44Aj
mov	ecx, dword ptr dword_7CB0044
mov	esi, [esp+3Ch+var_28]
lea	eax, [ecx+8Ch]
mov	ecx, dword ptr dword_7CB0040
cmp	edx, eax
lea	ecx, [esi+ecx+34h]
jl	short loc_4375F8
add	eax, 18h
cmp	edx, eax
jge	short loc_4375F8
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_4375F8
add	ecx, 14h
cmp	eax, ecx
jge	short loc_4375F8
mov	al, byte_81C1660
test	al, al
jz	short loc_4375F8
push	0
push	0
push	19h
mov	byte_81C1660, 0
call	sub_401570
mov	edx, dword ptr dword_7CC8888
add	esp, 0Ch
add	edx, ebp
mov	dword ptr dword_81C498C, 7Eh
mov	dword ptr dword_482924, edx
call	sub_426F20
mov	eax, dword ptr dword_81C494C
mov	edx, dword ptr dword_81C17B4
mov	byte_47CEB8, 0
mov	dword ptr dword_47CEBC, 1
mov	dword ptr dword_47CEC8, eax
mov	byte ptr dword_7C41368,	1

loc_4375F8:				; CODE XREF: sub_4370D0+48Aj
					; sub_4370D0+4ACj ...
mov	ecx, [esp+3Ch+var_28]
mov	eax, [esp+3Ch+var_24]
inc	ebp
add	ecx, 14h
cmp	ebp, eax
mov	[esp+3Ch+var_28], ecx
jl	loc_4374DD
mov	edi, dword ptr dword_7CB0040
mov	esi, dword ptr dword_7CB0044

loc_43761C:				; CODE XREF: sub_4370D0+403j
lea	eax, [esi+19h]
lea	ecx, [edi+18Bh]
cmp	edx, eax
jl	short loc_43768A
add	eax, 18h
cmp	edx, eax
jge	short loc_43768A
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_43768A
add	ecx, 18h
cmp	eax, ecx
jge	short loc_43768A
mov	al, byte_81C1660
test	al, al
jz	short loc_43768A
push	0
push	0
push	19h
mov	byte_81C1660, 0
mov	byte_7CC88BC, 0
call	sub_401570
push	0
push	0
push	1Ch
call	sub_401570
mov	edx, dword ptr dword_81C17B4
add	esp, 18h
mov	dword ptr dword_7C41CB8, 0
mov	dword ptr dword_47CE38, 6

loc_43768A:				; CODE XREF: sub_4370D0+3ACj
					; sub_4370D0+557j ...
mov	al, byte_7CC88BD
test	al, al
jz	loc_437846
mov	esi, dword ptr dword_7CC438C
mov	ecx, dword ptr dword_7CC4390
cmp	edx, esi
jl	short loc_4376CB
lea	eax, [esi+0BEh]
cmp	edx, eax
jge	short loc_4376CB
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_4376CB
lea	edi, [ecx+1B1h]
cmp	eax, edi
jge	short loc_4376CB
mov	byte_7BA8544, 1

loc_4376CB:				; CODE XREF: sub_4370D0+5D5j
					; sub_4370D0+5DFj ...
mov	eax, dword ptr dword_7CC889C
xor	ebp, ebp
test	eax, eax
jle	loc_4377DE
xor	ebx, ebx
mov	[esp+3Ch+var_28], offset byte_7C41D38

loc_4376E4:				; CODE XREF: sub_4370D0+6FCj
mov	ecx, dword ptr dword_79DBE88
mov	eax, offset byte_7C41D38
lea	edi, [ecx+17Ch]
mov	esi, edi

loc_4376F7:				; CODE XREF: sub_4370D0+645j
mov	dl, [eax]
mov	cl, dl
cmp	dl, [esi]
jnz	short loc_43771B
test	cl, cl
jz	short loc_437717
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [esi+1]
jnz	short loc_43771B
add	eax, 2
add	esi, 2
test	cl, cl
jnz	short loc_4376F7

loc_437717:				; CODE XREF: sub_4370D0+631j
xor	eax, eax
jmp	short loc_437720
; ---------------------------------------------------------------------------

loc_43771B:				; CODE XREF: sub_4370D0+62Dj
					; sub_4370D0+63Bj
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_437720:				; CODE XREF: sub_4370D0+649j
test	eax, eax
jz	short loc_437757
mov	eax, [esp+3Ch+var_28]
mov	esi, edi

loc_43772A:				; CODE XREF: sub_4370D0+678j
mov	dl, [eax]
mov	cl, dl
cmp	dl, [esi]
jnz	short loc_43774E
test	cl, cl
jz	short loc_43774A
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [esi+1]
jnz	short loc_43774E
add	eax, 2
add	esi, 2
test	cl, cl
jnz	short loc_43772A

loc_43774A:				; CODE XREF: sub_4370D0+664j
xor	eax, eax
jmp	short loc_437753
; ---------------------------------------------------------------------------

loc_43774E:				; CODE XREF: sub_4370D0+660j
					; sub_4370D0+66Ej
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_437753:				; CODE XREF: sub_4370D0+67Cj
test	eax, eax
jnz	short loc_4377B0

loc_437757:				; CODE XREF: sub_4370D0+652j
mov	eax, dword ptr dword_7CC438C
mov	ecx, dword ptr dword_7CC4390
mov	edx, dword ptr dword_81C17B4
add	eax, 8Ch
cmp	edx, eax
lea	ecx, [ebx+ecx+37h]
jl	short loc_4377B6
add	eax, 18h
cmp	edx, eax
jge	short loc_4377B6
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_4377B6
add	ecx, 18h
cmp	eax, ecx
jge	short loc_4377B6
mov	al, byte_81C1660
test	al, al
jz	short loc_4377B6
push	0
push	0
push	19h
mov	byte_81C1660, 0
call	sub_401570
push	ebp
call	sub_406EE0
add	esp, 10h

loc_4377B0:				; CODE XREF: sub_4370D0+685j
mov	edx, dword ptr dword_81C17B4

loc_4377B6:				; CODE XREF: sub_4370D0+6A3j
					; sub_4370D0+6AAj ...
mov	esi, [esp+3Ch+var_28]
mov	eax, dword ptr dword_7CC889C
inc	ebp
add	esi, 0Fh
add	ebx, 23h
cmp	ebp, eax
mov	[esp+3Ch+var_28], esi
jl	loc_4376E4
mov	ecx, dword ptr dword_7CC4390
mov	esi, dword ptr dword_7CC438C

loc_4377DE:				; CODE XREF: sub_4370D0+604j
lea	eax, [esi+19h]
add	ecx, 18Bh
cmp	edx, eax
jl	short loc_437846
add	eax, 18h
cmp	edx, eax
jge	short loc_437846
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_437846
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437846
mov	al, byte_81C1660
test	al, al
jz	short loc_437846
push	0
push	0
push	19h
mov	byte_81C1660, 0
mov	byte_7CC88BD, 0
call	sub_401570
push	0
push	0
push	1Ch
call	sub_401570
add	esp, 18h
mov	dword ptr dword_7C41CB8, 0
mov	dword ptr dword_47CE38, 6

loc_437846:				; CODE XREF: sub_4370D0+5C1j
					; sub_4370D0+719j ...
mov	al, byte_7CC88BE
test	al, al
jz	loc_43796B
mov	edx, dword ptr dword_7CC7FE4
mov	ebx, dword ptr dword_81C17B4
mov	ebp, dword ptr dword_7CC7FE8
cmp	ebx, edx
jl	short loc_43788D
lea	eax, [edx+0BEh]
cmp	ebx, eax
jge	short loc_43788D
mov	eax, dword ptr dword_81C17B0
cmp	eax, ebp
jl	short loc_43788D
lea	ecx, [ebp+1B1h]
cmp	eax, ecx
jge	short loc_43788D
mov	byte_7BA8544, 1

loc_43788D:				; CODE XREF: sub_4370D0+797j
					; sub_4370D0+7A1j ...
mov	eax, dword ptr equNewData570h_7B786CC
cmp	word ptr [eax+42h], 0
jbe	short loc_4378F6

xor	edi, edi
xor	esi, esi

loc_43789D:				; CODE XREF: sub_4370D0+824j
lea	eax, [edx+7Dh]
lea	ecx, [esi+ebp+55h]
cmp	ebx, eax
jl	short loc_4378EA
add	eax, 18h
cmp	ebx, eax
jge	short loc_4378EA
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_4378EA
add	ecx, 18h
cmp	eax, ecx
jge	short loc_4378EA
mov	al, byte_81C1660
test	al, al
jz	short loc_4378EA
push	edi
mov	byte_81C1660, 0
call	sub_406AF0
mov	edx, dword ptr dword_81C17B4
mov	edx, dword ptr dword_7CC7FE4
mov	ebp, dword ptr dword_7CC7FE8
add	esp, 4

loc_4378EA:				; CODE XREF: sub_4370D0+7D6j
					; sub_4370D0+7DDj ...
add	esi, 28h
inc	edi
cmp	esi, 0A0h
jl	short loc_43789D

loc_4378F6:				; CODE XREF: sub_4370D0+7C7j
lea	eax, [edx+19h]
mov	edi, 1
cmp	ebx, eax
lea	ecx, [ebp+18Bh]
jl	short loc_437976
add	eax, 18h
cmp	ebx, eax
jge	short loc_437976
mov	eax, dword ptr dword_81C17B0
cmp	eax, ecx
jl	short loc_437976
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437976
mov	al, byte_81C1660
test	al, al
jz	short loc_437976
push	0
push	0
push	19h
mov	byte_81C1660, 0
mov	byte_7CC88BE, 0
call	sub_401570
push	0
push	0
push	1Ch
call	sub_401570
mov	edx, dword ptr dword_81C17B4
add	esp, 18h
mov	dword ptr dword_7C41CB8, 0
mov	dword ptr dword_47CE38, 6
jmp	short loc_437976
; ---------------------------------------------------------------------------

loc_43796B:				; CODE XREF: sub_4370D0+77Dj
mov	ebx, dword ptr dword_81C17B4
mov	edi, 1

loc_437976:				; CODE XREF: sub_4370D0+836j
					; sub_4370D0+83Dj ...
mov	al, byte_7CC88BF
test	al, al
jz	loc_4380FE
mov	eax, dword ptr dword_7CC3AF0
cmp	ebx, eax
jl	short loc_4379B6
add	eax, 0BEh
cmp	ebx, eax
jge	short loc_4379B6
mov	eax, dword ptr dword_7CC3AEC
mov	ecx, dword ptr dword_81C17B0
cmp	ecx, eax
jl	short loc_4379BC
add	eax, 1B1h
cmp	ecx, eax
jge	short loc_4379BC
mov	byte_7BA8544, 1
jmp	short loc_4379BC
; ---------------------------------------------------------------------------

loc_4379B6:				; CODE XREF: sub_4370D0+8BAj
					; sub_4370D0+8C3j
mov	ecx, dword ptr dword_81C17B0

loc_4379BC:				; CODE XREF: sub_4370D0+8D2j
					; sub_4370D0+8DBj ...
mov	al, byte_7CC88C0
mov	edx, dword ptr dword_7CC8884
test	al, al
mov	eax, dword ptr dword_7CC8880
jz	short loc_4379F3
cmp	ebx, eax
jl	short loc_4379F3
lea	esi, [eax+0BEh]
cmp	ebx, esi
jge	short loc_4379F3
cmp	ecx, edx
jl	short loc_4379F3
lea	esi, [edx+1B1h]
cmp	ecx, esi
jge	short loc_4379F3
mov	byte_7BA8544, 1

loc_4379F3:				; CODE XREF: sub_4370D0+8FEj
					; sub_4370D0+902j ...
cmp	byte_7CC88C1, 0
jz	short loc_437A1F
cmp	ebx, eax
jl	short loc_437A1F
lea	esi, [eax+0BEh]
cmp	ebx, esi
jge	short loc_437A1F
cmp	ecx, edx
jl	short loc_437A1F
lea	esi, [edx+1B1h]
cmp	ecx, esi
jge	short loc_437A1F
mov	byte_7BA8544, 1

loc_437A1F:				; CODE XREF: sub_4370D0+92Aj
					; sub_4370D0+92Ej ...
cmp	byte_7CC88C2, 0
jz	short loc_437A4A
cmp	ebx, eax
jl	short loc_437A4A
add	eax, 0BEh
cmp	ebx, eax
jge	short loc_437A4A
cmp	ecx, edx
jl	short loc_437A4A
add	edx, 1B1h
cmp	ecx, edx
jge	short loc_437A4A
mov	byte_7BA8544, 1

loc_437A4A:				; CODE XREF: sub_4370D0+956j
					; sub_4370D0+95Aj ...
mov	al, byte_7CC88C3
test	al, al
jz	short loc_437A7E
mov	eax, dword ptr dword_7CC3AF8
cmp	ebx, eax
jl	short loc_437A7E
add	eax, 0BEh
cmp	ebx, eax
jge	short loc_437A7E
mov	eax, dword ptr dword_7CC3AF4
cmp	ecx, eax
jl	short loc_437A7E
add	eax, 1B1h
cmp	ecx, eax
jge	short loc_437A7E
mov	byte_7BA8544, 1

loc_437A7E:				; CODE XREF: sub_4370D0+981j
					; sub_4370D0+98Aj ...
xor	ebp, ebp
xor	eax, eax

loc_437A82:				; CODE XREF: sub_4370D0+9DDj
mov	ecx, dword ptr newData570h_7B786D4
cmp	word ptr [eax+ecx+208h], 0FFFFh
jnz	short loc_437A9D
mov	byte ptr [eax+ecx+248h], 0
jmp	short loc_437AA5
; ---------------------------------------------------------------------------

loc_437A9D:				; CODE XREF: sub_4370D0+9C1j
mov	byte ptr [eax+ecx+248h], 1

loc_437AA5:				; CODE XREF: sub_4370D0+9CBj
add	eax, 44h
cmp	eax, 330h
jl	short loc_437A82
push	8
push	8
push	offset word_7CC6C78
call	sub_436340
push	4
push	8
push	offset word_7CC3B00
call	sub_436340
push	4
push	8
push	offset word_7CC63F0
call	sub_436340
push	0Fh
push	8
push	offset byte_7CC4398
call	sub_436340
push	4
push	8
push	offset byte_7CC8000
call	sub_436340
fild	dword ptr dword_7CC3AEC
add	esp, 3Ch
mov	byte_7CC88E0, 0
fadd	dword ptr flt_478854
call	__ftol
cmp	dword ptr dword_81C17B0, eax
jge	short loc_437B1F
call	sub_434B40
jmp	short loc_437B48
; ---------------------------------------------------------------------------

loc_437B1F:				; CODE XREF: sub_4370D0+A46j
mov	ecx, dword ptr dword_7CC3AEC
mov	edx, dword ptr dword_7CC3AF0
push	ebp
push	8
push	8
add	ecx, 0C8h
push	offset word_7CC6C78
add	edx, 0Fh
push	ecx
push	edx
call	sub_434CA0
add	esp, 18h

loc_437B48:				; CODE XREF: sub_4370D0+A4Dj
mov	al, byte_7CC88C3
test	al, al
jz	short loc_437B9B
mov	eax, dword ptr dword_7CC3AF4
mov	ecx, dword ptr dword_7CC3AF8
push	ebp
push	4
push	8
add	eax, 46h
push	offset word_7CC3B00
add	ecx, 0Fh
push	eax
push	ecx
call	sub_434CA0
mov	edx, dword ptr dword_7CC3AF4
mov	eax, dword ptr dword_7CC3AF8
push	ebp
push	4
push	8
add	edx, 10Eh
push	offset word_7CC63F0
add	eax, 0Fh
push	edx
push	eax
call	sub_434CA0
add	esp, 30h

loc_437B9B:				; CODE XREF: sub_4370D0+A7Fj
mov	al, byte_7CC88C0
test	al, al
jz	short loc_437BCA
mov	ecx, dword ptr dword_7CC8884
mov	edx, dword ptr dword_7CC8880
push	edi
push	0Fh
push	8
add	ecx, 32h
push	offset byte_7CC4398
add	edx, 0Fh
push	ecx
push	edx
call	sub_434CA0
add	esp, 18h

loc_437BCA:				; CODE XREF: sub_4370D0+AD2j
mov	al, byte_7CC88C1
test	al, al
jz	short loc_437BF8
mov	eax, dword ptr dword_7CC8884
mov	ecx, dword ptr dword_7CC8880
push	ebp
push	0Fh
push	8
add	eax, 32h
push	offset byte_7CC4398
add	ecx, 0Fh
push	eax
push	ecx
call	sub_434CA0
add	esp, 18h

loc_437BF8:				; CODE XREF: sub_4370D0+B01j
mov	al, byte_7CC88C2
test	al, al
jz	loc_437D01
mov	edx, dword ptr dword_7CC8884
mov	eax, dword ptr dword_7CC8880
push	ebp
push	4
push	8
add	edx, 6Eh
push	offset byte_7CC8000
add	eax, 0Fh
push	edx
push	eax
call	sub_434CA0
mov	al, byte_7CC88C2
add	esp, 18h
test	al, al
jz	loc_437D01
cmp	dword ptr dword_7CC88C8, ebp
jnz	loc_437D01
mov	ecx, dword ptr dword_7CC8880
mov	edx, dword ptr dword_7CC8884
mov	eax, dword ptr dword_81C17B4
add	ecx, 4Bh
add	edx, 12Ch
cmp	eax, ecx
jl	loc_437D06
add	ecx, 2Ch
cmp	eax, ecx
jge	loc_437D06
mov	esi, dword ptr dword_81C17B0
cmp	esi, edx
jl	loc_437D0C
add	edx, 20h
cmp	esi, edx
jge	loc_437D0C
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437D0C
push	4
push	8
push	offset byte_7CC8000
mov	byte_81C1660, 0
call	sub_437000
add	esp, 0Ch
test	al, al
jnz	short loc_437CC5
push	2
push	offset byte_7BA6498
push	offset g_Default1
call	sub_4279C0
add	esp, 0Ch
jmp	short loc_437CF5
; ---------------------------------------------------------------------------

loc_437CC5:				; CODE XREF: sub_4370D0+BDDj
push	8
push	8
push	offset word_7CC6C78
call	sub_436F40
add	esp, 0Ch
test	al, al
jnz	short loc_437CF0
push	2
push	offset byte_7BA65C4
push	offset g_Default1
call	sub_4279C0
add	esp, 0Ch
jmp	short loc_437CF5
; ---------------------------------------------------------------------------

loc_437CF0:				; CODE XREF: sub_4370D0+C08j
call	sub_4072E0

loc_437CF5:				; CODE XREF: sub_4370D0+BF3j
					; sub_4370D0+C1Ej
push	ebp
push	ebp
push	19h
call	sub_401570
add	esp, 0Ch

loc_437D01:				; CODE XREF: sub_4370D0+B2Fj
					; sub_4370D0+B61j ...
mov	eax, dword ptr dword_81C17B4

loc_437D06:				; CODE XREF: sub_4370D0+B8Fj
					; sub_4370D0+B9Aj
mov	esi, dword ptr dword_81C17B0

loc_437D0C:				; CODE XREF: sub_4370D0+BA8j
					; sub_4370D0+BB3j ...
mov	cl, byte_7CC88C1
mov	ebx, 74h
test	cl, cl
jz	loc_437E97
mov	ecx, dword ptr dword_7CC8880
mov	edx, dword ptr dword_7CC8884
add	ecx, 1Ah
add	edx, 186h
cmp	eax, ecx
jl	short loc_437DA7
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437DA7
cmp	esi, edx
jl	short loc_437DA7
add	edx, 18h
cmp	esi, edx
jge	short loc_437DA7
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437DA7
mov	byte_81C1660, 0
mov	dword ptr dword_81C498C, ebx
call	sub_426F20
push	ebp
push	ebp
push	19h
mov	dword ptr dword_47CEC8, 8
mov	dword ptr dword_47CEBC, edi
mov	byte_47CEB8, 0
mov	byte_7C41CF1, 1
mov	dword ptr dword_7C41CF4, ebp
mov	dword ptr dword_7CC88B8, ebp
call	sub_401570
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0
add	esp, 0Ch

loc_437DA7:				; CODE XREF: sub_4370D0+C66j
					; sub_4370D0+C6Dj ...
mov	ecx, dword ptr dword_7CC8880
mov	edx, dword ptr dword_7CC8884
add	ecx, 4Ch
add	edx, 186h
cmp	eax, ecx
jl	short loc_437E2F
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437E2F
cmp	esi, edx
jl	short loc_437E2F
add	edx, 18h
cmp	esi, edx
jge	short loc_437E2F
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437E2F
mov	byte_81C1660, 0
mov	dword ptr dword_81C498C, ebx
call	sub_426F20
push	ebp
push	ebp
push	19h
mov	dword ptr dword_47CEC8, 8
mov	dword ptr dword_47CEBC, edi
mov	byte_47CEB8, 0
mov	byte_7C41CF1, 1
mov	dword ptr dword_7C41CF4, ebp
mov	dword ptr dword_7CC88B8, edi
call	sub_401570
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0
add	esp, 0Ch

loc_437E2F:				; CODE XREF: sub_4370D0+CEEj
					; sub_4370D0+CF5j ...
mov	ecx, dword ptr dword_7CC3AF0
mov	edx, dword ptr dword_7CC3AEC
add	ecx, 19h
add	edx, 18Bh
cmp	eax, ecx
jl	short loc_437E97
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437E97
cmp	esi, edx
jl	short loc_437E97
add	edx, 18h
cmp	esi, edx
jge	short loc_437E97
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437E97
mov	byte_81C1660, 0
call	sub_406D40
push	ebp
push	ebp
push	19h
mov	dword ptr dword_7C41CB8, ebp
mov	dword ptr dword_47CE38, 6
call	sub_401570
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0
add	esp, 0Ch

loc_437E97:				; CODE XREF: sub_4370D0+C49j
					; sub_4370D0+D76j ...
mov	cl, byte_7CC88C2
test	cl, cl
jz	short loc_437F09
mov	ecx, dword ptr dword_7CC3AF0
mov	edx, dword ptr dword_7CC3AEC
add	ecx, 19h
add	edx, 18Bh
cmp	eax, ecx
jl	short loc_437F09
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437F09
cmp	esi, edx
jl	short loc_437F09
add	edx, 18h
cmp	esi, edx
jge	short loc_437F09
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437F09
mov	byte_81C1660, 0
call	sub_407310
push	ebp
push	ebp
push	19h
mov	dword ptr dword_7C41CB8, ebp
mov	dword ptr dword_47CE38, 6
call	sub_401570
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0
add	esp, 0Ch

loc_437F09:				; CODE XREF: sub_4370D0+DCFj
					; sub_4370D0+DE8j ...
mov	cl, byte_7CC88C3
test	cl, cl
jz	loc_4380A7
mov	ecx, dword ptr dword_7CC3AF8
mov	edx, dword ptr dword_7CC3AF4
add	ecx, 1Ah
add	edx, 186h
cmp	eax, ecx
jl	short loc_437FA3
add	ecx, 18h
cmp	eax, ecx
jge	short loc_437FA3
cmp	esi, edx
jl	short loc_437FA3
add	edx, 18h
cmp	esi, edx
jge	short loc_437FA3
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_437FA3
mov	byte_81C1660, 0
mov	dword ptr dword_81C498C, ebx
call	sub_426F20
push	ebp
push	ebp
push	19h
mov	dword ptr dword_47CEC8, 8
mov	dword ptr dword_47CEBC, edi
mov	byte_47CEB8, 0
mov	byte_7C41CF1, 1
mov	dword ptr dword_7C41CF4, ebp
mov	dword ptr dword_7CC88B8, 2
call	sub_401570
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0
add	esp, 0Ch

loc_437FA3:				; CODE XREF: sub_4370D0+E5Ej
					; sub_4370D0+E65j ...
mov	ecx, dword ptr dword_7CC88B4
cmp	ecx, ebp
jle	short loc_437FB6
dec	ecx
mov	dword ptr dword_7CC88B4, ecx
cmp	ecx, ebp

loc_437FB6:				; CODE XREF: sub_4370D0+EDBj
jnz	loc_43803D
cmp	dword ptr dword_7CAFFB8, ebp
jnz	short loc_43803D
mov	ecx, dword ptr dword_7CC3AF8
mov	edx, dword ptr dword_7CC3AF4
add	ecx, 61h
add	edx, 186h
cmp	eax, ecx
jl	short loc_43803D
add	ecx, 18h
cmp	eax, ecx
jge	short loc_43803D
cmp	esi, edx
jl	short loc_43803D
add	edx, 18h
cmp	esi, edx
jge	short loc_43803D
mov	cl, byte_81C1660
test	cl, cl
jz	short loc_43803D
push	ebp
push	ebp
push	19h
mov	byte_81C1660, 0
call	sub_401570
mov	eax, dword ptr dword_7CAFFB8
add	esp, 0Ch
cmp	eax, ebp
jnz	short loc_438032
mov	bl, byte_7CC88AD
test	bl, bl
setz	al
xor	ecx, ecx
mov	byte_7CC88AD, al
mov	cl, al
push	ecx
call	sub_406C50
add	esp, 4

loc_438032:				; CODE XREF: sub_4370D0+F43j
mov	eax, dword ptr dword_81C17B4
mov	esi, dword ptr dword_81C17B0

loc_43803D:				; CODE XREF: sub_4370D0:loc_437FB6j
					; sub_4370D0+EF2j ...
mov	edx, dword ptr dword_7CC3AF8
lea	ecx, [edx+89h]
mov	edx, dword ptr dword_7CC3AF4
add	edx, 186h
cmp	eax, ecx
jl	loc_4380FE
add	ecx, 18h
cmp	eax, ecx
jge	loc_4380FE
cmp	esi, edx
jl	loc_4380FE
add	edx, 18h
cmp	esi, edx
jge	loc_4380FE
mov	al, byte_81C1660
test	al, al
jz	short loc_4380FE
push	ebp
push	ebp
push	19h
mov	byte_81C1660, 0
call	sub_401570
mov	eax, dword ptr dword_7CAFFB8
add	esp, 0Ch
cmp	eax, ebp
jnz	short loc_4380FE
call	sub_406C90
jmp	short loc_4380EE
; ---------------------------------------------------------------------------

loc_4380A7:				; CODE XREF: sub_4370D0+E41j
mov	ecx, dword ptr dword_7CC3AF0
mov	edx, dword ptr dword_7CC3AEC
add	ecx, 19h
add	edx, 18Bh
cmp	eax, ecx
jl	short loc_4380FE
add	ecx, 18h
cmp	eax, ecx
jge	short loc_4380FE
cmp	esi, edx
jl	short loc_4380FE
add	edx, 18h
cmp	esi, edx
jge	short loc_4380FE
mov	al, byte_81C1660
test	al, al
jz	short loc_4380FE
mov	byte_81C1660, 0
mov	byte_7CC88BF, 0
call	sub_433BE0

loc_4380EE:				; CODE XREF: sub_4370D0+FD5j
mov	dword ptr dword_7C41CB8, ebp
mov	dword ptr dword_47CE38, 6

loc_4380FE:				; CODE XREF: sub_4370D0+8ADj
					; sub_4370D0+F87j ...
mov	al, byte_7CC88E0
pop	edi
pop	esi
pop	ebp
test	al, al
pop	ebx
jnz	short loc_438110
call	sub_435840

loc_438110:				; CODE XREF: sub_4370D0+Bj
					; sub_4370D0+1039j
add	esp, 2Ch
retn
sub_4370D0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_438120(float,	float, int)
sub_438120 proc	near			; CODE XREF: sub_439F50+5CCp
					; sub_439F50+876p ...

var_28=	dword ptr -28h
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch

fild	[esp+arg_4]
push	esi
push	1				; float
push	1				; char
push	3F800000h			; float
fstp	[esp+10h+arg_4]
fild	[esp+10h+arg_0]
mov	eax, [esp+10h+arg_4]
push	3F3E0000h			; float
push	0				; int
push	0				; int
fstp	[esp+1Ch+arg_0]
mov	esi, [esp+1Ch+arg_0]
push	43800000h			; float
push	433E0000h			; float
push	eax				; float
push	esi				; float
push	104h				; texture
call	sub_44EFF0
fld	[esp+30h+arg_4]
add	esp, 2Ch
fadd	dword ptr flt_478960
push	1				; float
push	1				; char
push	3F310000h			; float
push	3F3E0000h			; float
push	0				; int
push	0				; int
push	43310000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+28h+var_28]		; float
push	esi				; float
push	105h				; texture
call	sub_44EFF0
mov	eax, [esp+30h+arg_8]
add	esp, 2Ch
test	eax, eax
jz	short loc_4381DC
fld	[esp+4+arg_4]
fadd	dword ptr flt_47895C
push	1				; float
push	1				; char
push	3F200000h			; float
push	3F3E0000h			; float
push	0				; int
push	0				; int
push	41200000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+28h+var_28]		; float
push	esi				; float
push	117h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_4381DC:				; CODE XREF: sub_438120+82j
pop	esi
retn
sub_438120 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4381E0 proc	near			; CODE XREF: sub_439F50+489p

var_150= dword ptr -150h
var_119= byte ptr -119h
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
String=	byte ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 11Ch
push	ebx
mov	ebx, [esp+120h+arg_0]
push	ebp
push	esi
mov	esi, [esp+128h+arg_4]
push	edi
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
mov	dword ptr dword_7CC7FE4, ebx
mov	dword ptr dword_7CC7FE8, esi
call	ds:glColor3f
call	sub_44E1C0
fild	[esp+12Ch+arg_4]
push	1				; float
push	1				; char
push	3F800000h			; float
push	3F3E0000h			; float
fstp	[esp+13Ch+var_114]
fild	[esp+13Ch+arg_0]
mov	eax, [esp+13Ch+var_114]
push	0				; int
push	0				; int
push	43800000h			; float
fstp	[esp+148h+var_110]
mov	edi, [esp+148h+var_110]
push	433E0000h			; float
push	eax				; float
push	edi				; float
push	104h				; texture
call	sub_44EFF0
fld	[esp+158h+var_114]
add	esp, 2Ch
fadd	dword ptr flt_478960
push	1				; float
push	1				; char
push	3F310000h			; float
push	3F3E0000h			; float
push	0				; int
push	0				; int
push	43310000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+150h+var_150]		; float
push	edi				; float
push	105h				; texture
call	sub_44EFF0
push	1
call	sub_44E240
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
mov	edi, ds:SelectObject
add	esp, 30h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	ecx, dword ptr equNewData570h_7B786CC
xor	eax, eax
mov	al, [ecx+0Bh]
lea	eax, [eax+eax*2]
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	edx, (byte_7B7C9CC+0A8Ch)[eax*4]
lea	eax, [esp+12Ch+String]
push	edx
push	ecx
push	offset aSS_2			; "%s(%s)"
push	eax				; char *
call	_sprintf
mov	ecx, dword ptr dword_79DBE88
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dl, [ecx+275h]
push	edx
call	sub_428410
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
lea	eax, [eax+eax*2]
lea	ecx, [eax+eax*4]
shl	ecx, 3
mov	eax, 0CCCCCCCDh
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+14Ch+String]
lea	eax, [esi+0Ch]
push	edx				; lpString
lea	ecx, [ebx+23h]
push	eax				; int
push	ecx				; int
call	sub_4273F0
fld	[esp+158h+var_110]
fadd	dword ptr flt_478968
add	esp, 2Ch
xor	ebp, ebp
mov	[esp+12Ch+var_118], ebp
fsub	dword ptr flt_4787A8
fstp	[esp+12Ch+var_10C]

loc_438350:				; CODE XREF: sub_4381E0+1C3j
fild	[esp+12Ch+var_118]
push	1				; float
push	1				; char
push	3F280000h			; float
mov	edx, [esp+138h+var_10C]
fadd	[esp+138h+var_114]
push	3F160000h			; float
push	0				; int
push	0				; int
push	41A80000h			; float
fadd	dword ptr flt_4786D0
push	42960000h			; float
push	ecx
fsub	dword ptr flt_4787CC
fstp	[esp+150h+var_150]		; float
push	edx				; float
push	0F5h				; texture
call	sub_44EFF0
add	ebp, 28h
add	esp, 2Ch
cmp	ebp, 0C8h
mov	[esp+12Ch+var_118], ebp
jl	short loc_438350
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr equNewData570h_7B786CC
xor	edx, edx
lea	ecx, [esp+12Ch+String]
mov	dx, [eax+0Eh]
push	edx
push	offset byte_7B8A748		; char *
push	ecx				; char *
call	_sprintf
mov	ecx, dword ptr g_wndWidth
push	0				; int
push	1				; int
lea	ebp, [esi+32h]
lea	eax, ds:0[ecx*8]
add	ebx, 0Eh
sub	eax, ecx
mov	dword ptr dword_47CEB4, 0
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
mov	[esp+140h+var_104], ebp
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 1
mul	edx
shr	edx, 9
lea	eax, [esp+140h+String]
push	edx				; x
push	eax				; lpString
push	ebp				; int
push	ebx				; int
call	sub_4273F0
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
add	esp, 24h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr equNewData570h_7B786CC
mov	ecx, [eax+24h]
mov	edx, [eax+10h]
push	ecx
push	edx
lea	eax, [esp+134h+String]
push	offset byte_7B8A874		; char *
push	eax				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
mov	ecx, [esp+13Ch+arg_0]
mov	edx, eax
push	0				; int
shl	edx, 6
add	edx, eax
mov	eax, 0CCCCCCCDh
shl	edx, 1
mul	edx
shr	edx, 9
push	0				; int
push	edx				; x
lea	eax, [esp+148h+String]
lea	edx, [esi+46h]
add	ecx, 18h
push	eax				; lpString
push	edx				; int
push	ecx				; int
mov	dword ptr dword_47CEB4, 80000000h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
call	sub_4273F0
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
add	esp, 28h
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr equNewData570h_7B786CC
xor	edx, edx
mov	dx, [eax+14h]
push	edx
push	offset byte_7B8A9A0		; char *
lea	ecx, [esp+134h+String]
push	ecx				; char *
call	_sprintf
mov	ecx, dword ptr g_wndWidth
push	0				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0
lea	eax, ds:0[ecx*8]
mov	dword ptr dword_47CEAC, 0FF67BFDFh
sub	eax, ecx
lea	ecx, [esi+5Ah]
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 1
mul	edx
shr	edx, 9
lea	eax, [esp+140h+String]
push	edx				; x
push	eax				; lpString
push	ecx				; int
push	ebx				; int
call	sub_4273F0
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
add	esp, 24h
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	edi ; SelectObject
mov	ecx, dword ptr newData570h_7B786D4
lea	eax, [ecx+208h]
mov	[esp+12Ch+var_10C], eax
mov	ax, [eax]
cmp	ax, 48h
mov	[esp+12Ch+var_108], eax
jl	short loc_43853D
cmp	ax, 4Fh
jl	short loc_43856E

loc_43853D:				; CODE XREF: sub_4381E0+355j
mov	cx, [ecx+24Ch]
cmp	cx, 40h
jl	short loc_438568
cmp	cx, 47h
jge	short loc_438568

loc_438550:				; CODE XREF: sub_4381E0+38Cj
mov	ecx, dword ptr equNewData570h_7B786CC
xor	edx, edx
xor	ebp, ebp
mov	dx, [ecx+30h]
mov	bp, [ecx+32h]
mov	[esp+12Ch+var_118], edx
jmp	short loc_438584
; ---------------------------------------------------------------------------

loc_438568:				; CODE XREF: sub_4381E0+368j
					; sub_4381E0+36Ej
cmp	ax, 0FFFFh
jz	short loc_438550

loc_43856E:				; CODE XREF: sub_4381E0+35Bj
mov	ecx, dword ptr equNewData570h_7B786CC
xor	edx, edx
xor	ebp, ebp
mov	dx, [ecx+2Ch]
mov	bp, [ecx+2Eh]
mov	[esp+12Ch+var_118], edx

loc_438584:				; CODE XREF: sub_4381E0+386j
mov	edx, dword ptr dword_79DBE88
cmp	byte ptr [edx+178h], 1
jnz	short loc_438610
mov	edx, dword ptr newData570h_7B786D4
mov	dx, [edx+24Ch]
test	dx, dx
jl	short loc_438610
cmp	dx, 60h
jge	short loc_438610
test	ax, ax
jl	short loc_438610
cmp	ax, 60h
jge	short loc_438610
xor	eax, eax
xor	edx, edx
mov	ax, [ecx+30h]
mov	dx, [ecx+2Ch]
add	eax, edx
lea	edx, [eax+eax*4]
lea	eax, [eax+edx*2]
lea	edx, [eax+eax*4]
mov	eax, 51EB851Fh
imul	edx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
xor	eax, eax
mov	ax, [ecx+32h]
mov	[esp+12Ch+var_118], edx
xor	edx, edx
mov	dx, [ecx+2Eh]
add	eax, edx
lea	ecx, [eax+eax*4]
lea	eax, [eax+ecx*2]
lea	ecx, [eax+eax*4]
mov	eax, 51EB851Fh
imul	ecx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
mov	eax, [esp+12Ch+var_108]
mov	ebp, edx

loc_438610:				; CODE XREF: sub_4381E0+3B1j
					; sub_4381E0+3C3j ...
cmp	ax, 0FFFFh
jz	short loc_438655
mov	ecx, dword ptr newData570h_7B786D4
cmp	ax, [ecx+24Ch]
jnz	short loc_438655
mov	eax, 66666667h
imul	ebp
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
test	edx, edx
jle	short loc_438655
mov	ecx, [esp+12Ch+var_118]
push	edx
push	ebp
push	ecx
lea	edx, [esp+138h+String]
push	offset byte_7B8AACC		; char *
push	edx				; char *
call	_sprintf
add	esp, 14h
jmp	short loc_43866D
; ---------------------------------------------------------------------------

loc_438655:				; CODE XREF: sub_4381E0+434j
					; sub_4381E0+443j ...
mov	eax, [esp+12Ch+var_118]
push	ebp
push	eax
lea	ecx, [esp+134h+String]
push	offset byte_7B8ABF8		; char *
push	ecx				; char *
call	_sprintf
add	esp, 10h

loc_43866D:				; CODE XREF: sub_4381E0+473j
mov	eax, dword ptr g_wndWidth
push	0				; int
mov	edx, eax
push	0				; int
shl	edx, 6
add	edx, eax
mov	eax, 0CCCCCCCDh
shl	edx, 1
mul	edx
shr	edx, 9
push	edx				; x
mov	edx, [esp+138h+arg_0]
lea	eax, [esp+138h+String]
lea	ecx, [esi+6Eh]
push	eax				; lpString
lea	eax, [edx+18h]
push	ecx				; int
push	eax				; int
mov	dword ptr dword_47CEB4, 80000000h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
call	sub_4273F0
mov	ebp, dword ptr newData570h_7B786D4
add	esp, 18h
mov	[esp+12Ch+var_119], 1
mov	eax, 2
lea	ecx, [ebp+290h]
mov	edx, ecx

loc_4386D2:				; CODE XREF: sub_4381E0+4FFj
cmp	word ptr [edx],	0FFFFh
jz	short loc_43871B
inc	eax
add	edx, 44h
cmp	eax, 6
jle	short loc_4386D2
movsx	edx, word ptr [ecx]
and	edx, 8000000Fh
jns	short loc_4386F1
dec	edx
or	edx, 0FFFFFFF0h
inc	edx

loc_4386F1:				; CODE XREF: sub_4381E0+50Aj
mov	eax, 3
lea	ecx, [ebp+2D4h]

loc_4386FC:				; CODE XREF: sub_4381E0+537j
movsx	ebp, word ptr [ecx]
and	ebp, 8000000Fh
jns	short loc_43870C
dec	ebp
or	ebp, 0FFFFFFF0h
inc	ebp

loc_43870C:				; CODE XREF: sub_4381E0+525j
cmp	edx, ebp
jnz	short loc_43871B
inc	eax
add	ecx, 44h
cmp	eax, 6
jle	short loc_4386FC
jmp	short loc_438720
; ---------------------------------------------------------------------------

loc_43871B:				; CODE XREF: sub_4381E0+4F6j
					; sub_4381E0+52Ej
mov	[esp+12Ch+var_119], 0

loc_438720:				; CODE XREF: sub_4381E0+539j
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr equNewData570h_7B786CC
xor	edx, edx
lea	ecx, [esp+12Ch+String]
mov	dx, [eax+16h]
push	edx
push	offset byte_7B8AD24		; char *
push	ecx				; char *
call	_sprintf
mov	ecx, dword ptr g_wndWidth
push	0				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0
lea	eax, ds:0[ecx*8]
mov	dword ptr dword_47CEAC, 0FF67BFDFh
sub	eax, ecx
lea	ecx, [esi+82h]
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 1
mul	edx
shr	edx, 9
lea	eax, [esp+140h+String]
push	edx				; x
push	eax				; lpString
push	ecx				; int
push	ebx				; int
call	sub_4273F0
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
add	esp, 24h
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	edi ; SelectObject
mov	al, [esp+12Ch+var_119]
test	al, al
jz	short loc_43881C
mov	eax, dword ptr equNewData570h_7B786CC
mov	bp, [eax+3Ah]
test	bp, bp
jbe	short loc_4387EF
xor	ecx, ecx
and	ebp, 0FFFFh
mov	cx, [eax+3Ch]
mov	eax, 66666667h
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
push	edx
push	ebp
push	ecx
lea	ecx, [esp+138h+String]
push	offset byte_7B8AE50		; char *
push	ecx				; char *
call	_sprintf
add	esp, 14h
jmp	short loc_438865
; ---------------------------------------------------------------------------

loc_4387EF:				; CODE XREF: sub_4381E0+5D9j
xor	ecx, ecx
mov	cx, [eax+3Ch]
mov	eax, 66666667h
imul	ecx
sar	edx, 2
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
push	edx
push	ecx
lea	ecx, [esp+134h+String]
push	offset byte_7B8AF7C		; char *
push	ecx				; char *
call	_sprintf
add	esp, 10h
jmp	short loc_438865
; ---------------------------------------------------------------------------

loc_43881C:				; CODE XREF: sub_4381E0+5CBj
mov	ecx, dword ptr equNewData570h_7B786CC
mov	ax, [ecx+3Ah]
test	ax, ax
jbe	short loc_43884C
xor	edx, edx
and	eax, 0FFFFh
mov	dx, [ecx+3Ch]
push	eax
push	edx
lea	eax, [esp+134h+String]
push	offset byte_7B8B0A8		; char *
push	eax				; char *
call	_sprintf
add	esp, 10h
jmp	short loc_438865
; ---------------------------------------------------------------------------

loc_43884C:				; CODE XREF: sub_4381E0+649j
xor	edx, edx
lea	eax, [esp+12Ch+String]
mov	dx, [ecx+3Ch]
push	edx
push	offset byte_7B8B1D4		; char *
push	eax				; char *
call	_sprintf
add	esp, 0Ch

loc_438865:				; CODE XREF: sub_4381E0+60Dj
					; sub_4381E0+63Aj ...
mov	eax, dword ptr g_wndWidth
push	0				; int
mov	ecx, eax
push	0				; int
shl	ecx, 6
add	ecx, eax
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
mov	ecx, [esp+134h+arg_0]
lea	eax, [esi+96h]
shr	edx, 9
push	edx				; x
lea	edx, [esp+138h+String]
push	edx				; lpString
lea	ebp, [ecx+18h]
push	eax				; int
push	ebp				; int
mov	dword ptr dword_47CEB4, 80000000h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
call	sub_4273F0
mov	edx, dword ptr hfont2_54CA6A4
mov	eax, dword ptr g_hdc2
add	esp, 18h
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	edi ; SelectObject
mov	edx, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
lea	eax, [esp+12Ch+String]
mov	cx, [edx+18h]
push	ecx
push	offset byte_7B8B300		; char *
push	eax				; char *
call	_sprintf
mov	ecx, dword ptr g_wndWidth
push	0				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0
lea	eax, ds:0[ecx*8]
mov	dword ptr dword_47CEAC, 0FF67BFDFh
sub	eax, ecx
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+144h+String]
lea	eax, [esi+0AAh]
push	edx				; lpString
push	eax				; int
push	ebx				; int
call	sub_4273F0
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
add	esp, 24h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
xor	edx, edx
mov	cx, [eax+20h]
mov	dx, [eax+1Ch]
push	ecx
push	edx
lea	eax, [esp+134h+String]
push	offset byte_7B8B42C		; char *
push	eax				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
push	0				; int
mov	ecx, eax
mov	dword ptr dword_47CEB4, 80000000h
shl	ecx, 6
add	ecx, eax
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
push	0				; int
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+148h+String]
lea	eax, [esi+0BEh]
push	edx				; lpString
push	eax				; int
push	ebp				; int
call	sub_4273F0
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
add	esp, 28h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	ecx, dword ptr equNewData570h_7B786CC
xor	eax, eax
lea	edx, [esp+12Ch+String]
mov	ax, [ecx+1Ah]
push	eax
push	offset byte_7B8B558		; char *
push	edx				; char *
call	_sprintf
mov	ecx, dword ptr g_wndWidth
push	0				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0
lea	eax, ds:0[ecx*8]
mov	dword ptr dword_47CEAC, 0FF67BFDFh
sub	eax, ecx
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+144h+String]
lea	eax, [esi+0D2h]
push	edx				; lpString
push	eax				; int
push	ebx				; int
call	sub_4273F0
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
add	esp, 24h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr dword_79DBE88
mov	al, [eax+178h]
test	al, al
jz	short loc_438A59
cmp	al, 3
jz	short loc_438A59
mov	eax, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
xor	edx, edx
mov	cx, [eax+22h]
mov	dx, [eax+1Eh]
push	ecx
push	edx
push	offset byte_7B8B7B0
jmp	short loc_438A71
; ---------------------------------------------------------------------------

loc_438A59:				; CODE XREF: sub_4381E0+859j
					; sub_4381E0+85Dj
mov	eax, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
xor	edx, edx
mov	cx, [eax+22h]
mov	dx, [eax+1Eh]
push	ecx
push	edx
push	offset byte_7B8B684		; char *

loc_438A71:				; CODE XREF: sub_4381E0+877j
lea	eax, [esp+138h+String]
push	eax				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
add	esp, 10h
mov	ecx, eax
mov	dword ptr dword_47CEB4, 80000000h
shl	ecx, 6
add	ecx, eax
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
push	0				; int
push	0				; int
shr	edx, 9
push	edx				; x
lea	edx, [esp+138h+String]
lea	eax, [esi+0E6h]
push	edx				; lpString
push	eax				; int
push	ebp				; int
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
call	sub_4273F0
mov	ecx, dword ptr dword_79DBE88
add	esp, 18h
mov	al, [ecx+178h]
test	al, al
jz	short loc_438ADC
cmp	al, 3
jnz	loc_438BF2

loc_438ADC:				; CODE XREF: sub_4381E0+8F2j
xor	edx, edx
mov	ebx, dword ptr newData900h1_7B7BCE4
mov	dl, [ecx+31Dh]
xor	ecx, ecx
mov	eax, edx
mov	edx, dword ptr equNewData570h_7B786CC
mov	cl, [eax+edx+45h]
mov	eax, ecx
xor	ecx, ecx
lea	eax, [eax+eax*8]
mov	cl, [ebx+eax*4+21h]
mov	eax, [esp+12Ch+var_10C]
mov	ax, [eax]
cmp	ax, 50h
jl	short loc_438B83
cmp	ax, 60h
jge	short loc_438B83
xor	eax, eax
mov	ax, [edx+36h]
mov	ebx, eax
mov	eax, ecx
cdq
sub	eax, edx
mov	edx, ecx
sar	eax, 1
add	edx, ebx
xor	ebx, ebx
add	eax, edx
mov	[esp+12Ch+var_108], eax
mov	eax, [esp+12Ch+var_10C]
mov	edx, [eax+4]
mov	bx, [eax+0Ch]
sar	edx, 3
and	edx, 0Fh
mov	eax, 51EB851Fh
shr	ebx, 1
lea	edx, [ebx+edx*2]
mov	ebx, [esp+12Ch+var_108]
imul	edx, ebx
imul	edx
sar	edx, 5
mov	eax, edx
shr	eax, 1Fh
add	edx, eax
mov	eax, dword ptr equNewData570h_7B786CC
push	edx
xor	edx, edx
mov	dx, [eax+34h]
push	ebx
add	edx, ecx
lea	ecx, [esp+134h+String]
push	edx
push	offset byte_7B8B8DC		; char *
push	ecx				; char *
call	_sprintf
add	esp, 14h
jmp	short loc_438BBA
; ---------------------------------------------------------------------------

loc_438B83:				; CODE XREF: sub_4381E0+92Ej
					; sub_4381E0+934j
xor	eax, eax
mov	ax, [edx+36h]
mov	ebx, eax
mov	eax, ecx
cdq
sub	eax, edx
mov	edx, ecx
sar	eax, 1
add	edx, ebx
add	eax, edx
mov	edx, dword ptr equNewData570h_7B786CC
push	eax
xor	eax, eax
mov	ax, [edx+34h]
add	eax, ecx
push	eax
lea	eax, [esp+134h+String]
push	offset byte_7B8BA08		; char *
push	eax				; char *
call	_sprintf
add	esp, 10h

loc_438BBA:				; CODE XREF: sub_4381E0+9A1j
mov	eax, dword ptr g_wndWidth
push	0				; int
mov	ecx, eax
push	0				; int
shl	ecx, 6
add	ecx, eax
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+138h+String]
lea	eax, [esi+0F6h]
push	edx				; lpString
push	eax				; int
push	ebp				; int
call	sub_4273F0
mov	ecx, dword ptr dword_79DBE88
add	esp, 18h

loc_438BF2:				; CODE XREF: sub_4381E0+8F6j
mov	cl, [ecx+178h]
cmp	cl, 1
jz	short loc_438C0B
cmp	cl, 3
jnz	loc_438CCE
cmp	cl, 1
jnz	short loc_438C69

loc_438C0B:				; CODE XREF: sub_4381E0+A1Bj
mov	edx, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
mov	eax, 88888889h
mov	cx, [edx+1Ah]
imul	ecx
add	edx, ecx
sar	edx, 3
mov	eax, edx
shr	eax, 1Fh
lea	ecx, [edx+eax+0C8h]
lea	edx, [esp+12Ch+String]
push	ecx
push	offset byte_7BA66F0		; char *
push	edx				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
push	0
mov	ecx, eax
push	0
shl	ecx, 6
add	ecx, eax
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx
lea	edx, [esp+144h+String]
push	edx
add	esi, 0F6h
jmp	short loc_438CC4
; ---------------------------------------------------------------------------

loc_438C69:				; CODE XREF: sub_4381E0+A29j
mov	eax, dword ptr equNewData570h_7B786CC
xor	ecx, ecx
mov	cx, [eax+1Ah]
mov	eax, 88888889h
imul	ecx
add	edx, ecx
lea	eax, [esp+12Ch+String]
sar	edx, 4
mov	ecx, edx
shr	ecx, 1Fh
lea	edx, [edx+ecx+0C8h]
push	edx
push	offset byte_7BA66F0		; char *
push	eax				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
push	0				; int
mov	ecx, eax
push	0				; int
shl	ecx, 6
add	ecx, eax
mov	eax, 0CCCCCCCDh
shl	ecx, 1
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [esp+144h+String]
push	edx				; lpString
add	esi, 106h

loc_438CC4:				; CODE XREF: sub_4381E0+A87j
push	esi				; int
push	ebp				; int
call	sub_4273F0
add	esp, 24h

loc_438CCE:				; CODE XREF: sub_4381E0+A20j
mov	eax, dword ptr equNewData570h_7B786CC
cmp	word ptr [eax+42h], 0
jbe	loc_438E52
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	ecx, dword ptr equNewData570h_7B786CC
xor	eax, eax
lea	edx, [esp+12Ch+String]
mov	ax, [ecx+42h]
push	eax
push	offset byte_7B8BB34		; char *
push	edx				; char *
call	_sprintf
mov	eax, dword ptr g_wndWidth
push	0				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0FFC86E1Eh
lea	eax, [eax+eax*2]
mov	dword ptr dword_47CEAC, 0FF000000h
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 2
mul	ecx
mov	ecx, [esp+140h+arg_0]
mov	eax, [esp+140h+var_104]
shr	edx, 9
push	edx				; x
lea	edx, [esp+144h+String]
push	edx				; lpString
add	ecx, 69h
push	eax				; int
push	ecx				; int
call	sub_4273F0
fld	[esp+150h+var_110]
fadd	dword ptr flt_478964
add	esp, 24h
xor	edi, edi
mov	[esp+12Ch+var_10C], edi
fstp	[esp+12Ch+var_110]
fld	[esp+12Ch+var_114]
fadd	dword ptr flt_4786E8
mov	esi, [esp+12Ch+var_110]
fsub	dword ptr flt_478764
fstp	[esp+12Ch+var_104]

loc_438D84:				; CODE XREF: sub_4381E0+C6Cj
fild	[esp+12Ch+var_10C]
mov	al, byte_81C17F8
test	al, al
fadd	[esp+12Ch+var_104]
fstp	[esp+12Ch+var_114]
jz	short loc_438E10
fild	dword ptr dword_81C17B4
fcom	[esp+12Ch+var_110]
fnstsw	ax
test	ah, 1
jnz	short loc_438E0E
fld	[esp+12Ch+var_110]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_438E10
fild	dword ptr dword_81C17B0
fcom	[esp+12Ch+var_114]
fnstsw	ax
test	ah, 1
jnz	short loc_438E0E
fld	[esp+12Ch+var_114]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_438E10
mov	edx, [esp+12Ch+var_114]
push	1
push	1
push	3F400000h
push	3F400000h
push	0
push	0
push	41C00000h
push	41C00000h
push	edx
push	esi
push	121h
jmp	short loc_438E37
; ---------------------------------------------------------------------------

loc_438E0E:				; CODE XREF: sub_4381E0+BC8j
					; sub_4381E0+BEEj
fstp	st

loc_438E10:				; CODE XREF: sub_4381E0+BB7j
					; sub_4381E0+BDDj ...
mov	eax, [esp+12Ch+var_114]
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	eax				; float
push	esi				; float
push	120h				; texture

loc_438E37:				; CODE XREF: sub_4381E0+C2Cj
call	sub_44EFF0
add	edi, 28h
add	esp, 2Ch
cmp	edi, 0A0h
mov	[esp+12Ch+var_10C], edi
jl	loc_438D84

loc_438E52:				; CODE XREF: sub_4381E0+AF8j
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 11Ch
retn
sub_4381E0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_438E60 proc	near			; CODE XREF: sub_439F50+370p

var_14C= dword ptr -14Ch
var_118= dword ptr -118h
var_114= dword ptr -114h
var_110= dword ptr -110h
var_10C= dword ptr -10Ch
var_108= dword ptr -108h
var_104= dword ptr -104h
String=	byte ptr -100h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 118h
push	ebx
mov	ebx, [esp+11Ch+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+128h+arg_0]
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
mov	dword ptr dword_7CC438C, edi
mov	dword ptr dword_7CC4390, ebx
call	ds:glColor3f
call	sub_44E1C0
fild	[esp+128h+arg_4]
push	1				; float
push	1				; char
push	3F800000h			; float
xor	ebp, ebp
fstp	[esp+134h+var_110]
fild	[esp+134h+arg_0]
mov	eax, [esp+134h+var_110]
push	3F3E0000h			; float
push	ebp				; int
push	ebp				; int
fstp	[esp+140h+var_118]
mov	esi, [esp+140h+var_118]
push	43800000h			; float
push	433E0000h			; float
push	eax				; float
push	esi				; float
push	104h				; texture
call	sub_44EFF0
fld	[esp+154h+var_110]
add	esp, 2Ch
fadd	dword ptr flt_478960
push	1				; float
push	1				; char
push	3F310000h			; float
push	3F3E0000h			; float
push	ebp				; int
push	ebp				; int
push	43310000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+14Ch+var_14C]		; float
push	esi				; float
push	105h				; texture
call	sub_44EFF0
push	1
call	sub_44E240
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
mov	esi, ds:SelectObject
add	esp, 30h
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
lea	eax, [eax+eax*2]
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 3
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [ebx+0Ch]
push	offset byte_7B89B90		; lpString
lea	eax, [edi+23h]
push	edx				; int
push	eax				; int
call	sub_4273F0
mov	ecx, dword ptr hfont1_54CA6A0
add	esp, 18h
mov	dword ptr dword_47CEB4, ebp
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
push	ecx				; hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
push	edx				; g_hdc2
call	esi ; SelectObject
cmp	dword ptr dword_7CC889C, ebp
jnz	loc_43903C
push	ebp				; int
push	ebp				; int
push	ebp				; x
lea	eax, [ebx+32h]
lea	esi, [edi+14h]
push	offset byte_7B89CBC		; lpString
push	eax				; int
push	esi				; int
call	sub_4273F0
push	ebp				; int
push	ebp				; int
push	ebp				; x
lea	ecx, [ebx+41h]
push	offset byte_7B89DE8		; lpString
push	ecx				; int
push	esi				; int
call	sub_4273F0
push	ebp				; int
push	ebp				; int
push	ebp				; x
lea	edx, [ebx+50h]
push	offset byte_7B89F14		; lpString
push	edx				; int
push	esi				; int
call	sub_4273F0
add	esp, 48h
lea	eax, [ebx+64h]
push	ebp				; int
push	ebp				; int
push	ebp				; x
push	offset byte_7B8A040		; lpString
push	eax				; int
push	esi				; int
call	sub_4273F0
push	ebp				; int
push	ebp				; int
push	ebp				; x
lea	ecx, [ebx+73h]
push	offset byte_7B8A16C		; lpString
push	ecx				; int
push	esi				; int
call	sub_4273F0
push	ebp				; int
push	ebp				; int
push	ebp				; x
lea	edx, [ebx+82h]
push	offset byte_7B8A298		; lpString
push	edx				; int
push	esi				; int
call	sub_4273F0
add	esp, 48h
lea	eax, [ebx+91h]
push	ebp				; int
push	ebp				; int
push	ebp				; x
push	offset byte_7B8A3C4		; lpString
push	eax				; int
push	esi				; int
call	sub_4273F0
add	esp, 18h

loc_43903C:				; CODE XREF: sub_438E60+146j
mov	eax, dword ptr dword_7CC889C
mov	[esp+128h+var_110], ebp
test	eax, eax
jle	loc_43932A
lea	ecx, [edi+14h]
lea	edx, [edi+28h]
add	edi, 5Ah
mov	[esp+128h+var_10C], ecx
mov	[esp+128h+var_104], edx
mov	[esp+128h+var_108], edi
jmp	short loc_439068
; ---------------------------------------------------------------------------

loc_439064:				; CODE XREF: sub_438E60+4C4j
mov	ebp, [esp+128h+var_110]

loc_439068:				; CODE XREF: sub_438E60+202j
lea	esi, [ebp+ebp*2+0]
test	ebp, ebp
lea	esi, byte_7C41D38[esi+esi*4]
jnz	short loc_43908D
mov	dword ptr dword_47CEB4, 0FF962828h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
jmp	short loc_4390A1
; ---------------------------------------------------------------------------

loc_43908D:				; CODE XREF: sub_438E60+215j
mov	dword ptr dword_47CEB4, 0
mov	dword ptr dword_47CEAC, 0FFFFE6D2h

loc_4390A1:				; CODE XREF: sub_438E60+22Bj
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	ds:SelectObject
lea	eax, ds:0[ebp*8]
push	0				; int
sub	eax, ebp
push	0				; int
push	0				; x
push	esi				; lpString
lea	edi, [eax+eax*4]
mov	eax, [esp+138h+var_10C]
mov	[esp+138h+var_114], edi
lea	edx, [edi+ebx+34h]
push	edx				; int
push	eax				; int
call	sub_4273F0
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
add	esp, 18h
mov	dword ptr dword_47CEB4, 0
mov	dword ptr dword_47CEAC, 0FFD2E6FFh
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	ds:SelectObject
xor	eax, eax
lea	edx, [esp+128h+String]
mov	al, [esi+0Ch]
lea	eax, [eax+eax*2]
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	ecx, (byte_7B7C9CC+1644h)[eax*4]
push	ecx
push	offset aS_0			; "%s"
push	edx				; char *
call	_sprintf
mov	ecx, [esp+134h+var_104]
push	0				; int
push	0				; int
lea	eax, [esp+13Ch+String]
lea	edi, [edi+ebx+41h]
push	0				; x
push	eax				; lpString
push	edi				; int
push	ecx				; int
call	sub_4273F0
xor	edx, edx
xor	eax, eax
mov	dl, [esi+0Eh]
mov	al, [esi+0Dh]
push	edx
push	eax
lea	ecx, [esp+154h+String]
push	offset aDD_1			; "%d,%d"
push	ecx				; char *
call	_sprintf
mov	eax, [esp+15Ch+var_108]
push	0				; int
push	0				; int
lea	edx, [esp+164h+String]
push	0				; x
push	edx				; lpString
push	edi				; int
push	eax				; int
call	sub_4273F0
mov	ecx, dword ptr dword_79DBE88
add	esp, 4Ch
mov	eax, offset byte_7C41D38
lea	ebp, [ecx+17Ch]
mov	edi, ebp

loc_43918B:				; CODE XREF: sub_438E60+349j
mov	dl, [eax]
mov	cl, dl
cmp	dl, [edi]
jnz	short loc_4391AF
test	cl, cl
jz	short loc_4391AB
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [edi+1]
jnz	short loc_4391AF
add	eax, 2
add	edi, 2
test	cl, cl
jnz	short loc_43918B

loc_4391AB:				; CODE XREF: sub_438E60+335j
xor	eax, eax
jmp	short loc_4391B4
; ---------------------------------------------------------------------------

loc_4391AF:				; CODE XREF: sub_438E60+331j
					; sub_438E60+33Fj
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_4391B4:				; CODE XREF: sub_438E60+34Dj
test	eax, eax
jz	short loc_4391EE

loc_4391B8:				; CODE XREF: sub_438E60+37Bj
mov	cl, [esi]
mov	dl, [ebp+0]
mov	al, cl
cmp	cl, dl
jnz	short loc_4391E1
test	al, al
jz	short loc_4391DD
mov	dl, [esi+1]
mov	cl, [ebp+1]
mov	al, dl
cmp	dl, cl
jnz	short loc_4391E1
add	esi, 2
add	ebp, 2
test	al, al
jnz	short loc_4391B8

loc_4391DD:				; CODE XREF: sub_438E60+365j
xor	eax, eax
jmp	short loc_4391E6
; ---------------------------------------------------------------------------

loc_4391E1:				; CODE XREF: sub_438E60+361j
					; sub_438E60+371j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_4391E6:				; CODE XREF: sub_438E60+37Fj
test	eax, eax
jnz	loc_439313

loc_4391EE:				; CODE XREF: sub_438E60+356j
fild	dword ptr dword_7CC438C
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4787F0
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+148h+var_118]
fild	[esp+148h+var_114]
mov	edi, [esp+148h+var_118]
fiadd	dword ptr dword_7CC4390
fadd	dword ptr flt_47893C
fstp	[esp+148h+var_114]
mov	esi, [esp+148h+var_114]
push	esi				; float
push	edi				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+128h+var_118]
fnstsw	ax
test	ah, 1
jnz	loc_439311
fld	[esp+128h+var_118]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_439313
fild	dword ptr dword_81C17B0
fcom	[esp+128h+var_114]
fnstsw	ax
test	ah, 1
jnz	loc_439311
fld	[esp+128h+var_114]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_439313
mov	al, byte_81C17F8
test	al, al
jz	short loc_4392D1
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	esi				; float
push	edi				; float
push	119h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_4392D1:				; CODE XREF: sub_438E60+444j
fld	[esp+128h+var_114]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
mov	dword ptr dword_47CEB4, 0FF000000h
push	offset byte_7B89A64		; lpString
call	__ftol
fld	[esp+138h+var_118]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_439313
; ---------------------------------------------------------------------------

loc_439311:				; CODE XREF: sub_438E60+3F4j
					; sub_438E60+422j
fstp	st

loc_439313:				; CODE XREF: sub_438E60+388j
					; sub_438E60+40Dj ...
mov	eax, [esp+128h+var_110]
mov	ecx, dword ptr dword_7CC889C
inc	eax
cmp	eax, ecx
mov	[esp+128h+var_110], eax
jl	loc_439064

loc_43932A:				; CODE XREF: sub_438E60+1E7j
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 118h
retn
sub_438E60 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_439340 proc	near			; CODE XREF: sub_416D40+6B4p
					; sub_42E970+C0p ...

width1= dword ptr -8
height=	dword ptr -4
arg_0= dword ptr  4

sub	esp, 8
fld dword ptr flt_81C5030
push	ebx
push	ebp
push	esi
push	edi
call	__ftol
fld dword ptr flt_81C5034
mov	[esp+18h+width1], eax
call	__ftol
mov	esi, dword ptr dword_81C503C
mov	[esp+18h+height], eax
xor	eax, eax
mov	ebp, 0FFFF8000h
mov	ebx, 0FFFF0000h
mov	edi, 0FFFF0080h
mov	edx, 0FFFF00FFh
mov	ecx, 0FF8000FFh

loc_439386:				; CODE XREF: sub_439340+10Dj
cmp	eax, 0Fh			; switch 16 cases
ja	loc_439449			; jumptable 0043938F default case
jmp	ds:off_4394D4[eax*4]		; switch jump
; ---------------------------------------------------------------------------

loc_439396:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D84, 0		; jumptable 0043938F case 0
jmp	loc_439449			; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393A5:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D88, 0FF000000h	; jumptable 0043938F case 1
jmp	loc_439449			; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393B4:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D8C, 0FF808080h	; jumptable 0043938F case 2
jmp	loc_439449			; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393C3:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D90, 0FFFFFFFFh	; jumptable 0043938F case 3
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393CF:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D94, 0FF0000FFh	; jumptable 0043938F case 4
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393DB:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D98, 0FF0080FFh	; jumptable 0043938F case 5
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393E7:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41D9C, 0FF00FFFFh	; jumptable 0043938F case 6
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393F3:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DA0, 0FF00FF80h	; jumptable 0043938F case 7
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_4393FF:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DA4, 0FF00FF00h	; jumptable 0043938F case 8
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_43940B:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DA8, 0FF80FF00h	; jumptable 0043938F case 9
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_439417:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DAC, 0FFFFFF00h	; jumptable 0043938F case 10
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_439423:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DB0, ebp		; jumptable 0043938F case 11
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_43942B:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DB4, ebx		; jumptable 0043938F case 12
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_439433:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DB8, edi		; jumptable 0043938F case 13
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_43943B:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DBC, edx		; jumptable 0043938F case 14
jmp	short loc_439449		; jumptable 0043938F default case
; ---------------------------------------------------------------------------

loc_439443:				; CODE XREF: sub_439340+4Fj
					; DATA XREF: .text:off_4394D4o
mov	dword ptr dword_7C41DC0, ecx		; jumptable 0043938F case 15

loc_439449:				; CODE XREF: sub_439340+49j
					; sub_439340+60j ...
inc	eax				; jumptable 0043938F default case
cmp	eax, 10h
jl	loc_439386
mov	eax, [esp+18h+arg_0]
mov	ebx, [esp+18h+height]
lea	eax, [eax+eax*4]
shl	eax, 4
add	eax, offset byte_7CB0275
test	ebx, ebx
jle	short loc_439490
mov	edi, ebx

loc_43946C:				; CODE XREF: sub_439340+14Cj
mov	ebp, [esp+18h+width1]
test	ebp, ebp
jle	short loc_43948B
mov	ecx, ebp

loc_439476:				; CODE XREF: sub_439340+149j
xor	edx, edx
add	esi, 4
mov	dl, [eax]
inc	eax
dec	ecx
mov	edx, dword ptr dword_7C41D84[edx*4]
mov	[esi-4], edx
jnz	short loc_439476

loc_43948B:				; CODE XREF: sub_439340+132j
dec	edi
jnz	short loc_43946C
jmp	short loc_439494
; ---------------------------------------------------------------------------

loc_439490:				; CODE XREF: sub_439340+128j
mov	ebp, [esp+18h+width1]

loc_439494:				; CODE XREF: sub_439340+14Ej
push	22h				; texture
push	0DE1h				; target
call	ds:glBindTexture
mov	eax, dword ptr dword_81C503C
movsx	ecx, byte_81C5038
push	eax				; pixels
push	1401h				; type
push	1908h				; format
push	0				; border
push	ebx				; height
push	ebp				; width
push	ecx				; internalformat
push	0				; level
push	0DE1h				; target
call	ds:glTexImage2D
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8
retn
; ---------------------------------------------------------------------------
align 4
off_4394D4 dd offset loc_439396		; DATA XREF: sub_439340+4Fr
dd offset loc_4393A5			; jump table for switch	statement
dd offset loc_4393B4
dd offset loc_4393C3
dd offset loc_4393CF
dd offset loc_4393DB
dd offset loc_4393E7
dd offset loc_4393F3
dd offset loc_4393FF
dd offset loc_43940B
dd offset loc_439417
dd offset loc_439423
dd offset loc_43942B
dd offset loc_439433
dd offset loc_43943B
dd offset loc_439443
sub_439340 endp

align 10h

; =============== S U B	R O U T	I N E =======================================


; int __cdecl sub_439520(float,	float, float, float, int)
sub_439520 proc	near			; CODE XREF: sub_4396A0+24Fp
					; sub_4396A0+2BDp ...

var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_30=	dword ptr -30h
var_2C=	dword ptr -2Ch
var_20=	dword ptr -20h
var_1C=	dword ptr -1Ch
arg_0= dword ptr  4
arg_4= dword ptr  8
arg_8= dword ptr  0Ch
arg_C= dword ptr  10h
arg_10=	dword ptr  14h

fild	[esp+arg_C]
push	ebx
push	ebp
push	esi
push	edi
fstp	[esp+10h+arg_C]
fild	[esp+10h+arg_8]
push	1				; float
push	1				; char
push	ecx
fstp	[esp+1Ch+arg_8]
fld	[esp+1Ch+arg_C]
fmul	dword ptr flt_47896C
fstp	[esp+1Ch+var_1C]		; float
fld	[esp+1Ch+arg_8]
fmul	dword ptr flt_478874
push	ecx
fstp	[esp+20h+var_20]		; float
fld	[esp+20h+arg_C]
fadd	dword ptr flt_4787B0
push	0				; int
push	0				; int
push	ecx
fstp	[esp+2Ch+var_2C]		; float
fld	[esp+2Ch+arg_8]
fadd	dword ptr flt_4787B0
push	ecx
fstp	[esp+30h+var_30]		; float
fld	[esp+30h+arg_4]
fsub	dword ptr flt_4786B8
push	ecx
fstp	[esp+34h+var_34]		; float
fld	[esp+34h+arg_0]
fsub	dword ptr flt_4786B8
push	ecx
fstp	[esp+38h+var_38]		; float
push	116h				; texture
call	sub_44EFF0
fld dword ptr flt_81C5030
add	esp, 2Ch
call	__ftol
fld dword ptr flt_81C5034
mov	esi, eax
call	__ftol
mov	ecx, [esp+10h+arg_10]
mov	edx, dword ptr dword_81C503C
mov	ebp, eax
mov	eax, dword ptr dword_7C41D84[ecx*4]
test	ecx, ecx
jnz	short loc_439618
test	ebp, ebp
jle	short loc_4395E7
mov	ebx, ebp

loc_4395D2:				; CODE XREF: sub_439520+C5j
test	esi, esi
jle	short loc_4395E4
mov	ecx, esi
mov	eax, 0FF000000h
mov	edi, edx
lea	edx, [edx+esi*4]
rep stosd

loc_4395E4:				; CODE XREF: sub_439520+B4j
dec	ebx
jnz	short loc_4395D2

loc_4395E7:				; CODE XREF: sub_439520+AEj
mov	eax, dword ptr dword_81C503C
mov	ecx, 8

loc_4395F1:				; CODE XREF: sub_439520+DBj
mov	dword ptr [eax], 0FF808080h
add	eax, 24h
dec	ecx
jnz	short loc_4395F1
mov	eax, dword ptr dword_81C503C
mov	ecx, 8
add	eax, 1Ch

loc_43960A:				; CODE XREF: sub_439520+F4j
mov	dword ptr [eax], 0FF808080h
add	eax, 1Ch
dec	ecx
jnz	short loc_43960A
jmp	short loc_43962E
; ---------------------------------------------------------------------------

loc_439618:				; CODE XREF: sub_439520+AAj
test	ebp, ebp
jle	short loc_43962E
mov	ebx, ebp

loc_43961E:				; CODE XREF: sub_439520+10Cj
test	esi, esi
jle	short loc_43962B
mov	ecx, esi
mov	edi, edx
rep stosd
lea	edx, [edx+esi*4]

loc_43962B:				; CODE XREF: sub_439520+100j
dec	ebx
jnz	short loc_43961E

loc_43962E:				; CODE XREF: sub_439520+F6j
					; sub_439520+FAj
push	22h				; texture
push	0DE1h				; target
call	ds:glBindTexture
mov	ecx, dword ptr dword_81C503C
movsx	edx, byte_81C5038
push	ecx				; pixels
push	1401h				; type
push	1908h				; format
push	0				; border
push	ebp				; height
push	esi				; width
push	edx				; internalformat
push	0				; level
push	0DE1h				; target
call	ds:glTexImage2D
mov	eax, [esp+10h+arg_C]
mov	ecx, [esp+10h+arg_8]
mov	edx, [esp+10h+arg_4]
push	1				; float
push	1				; char
push	3F800000h			; float
push	3F800000h			; float
push	0				; int
push	0				; int
push	eax				; float
mov	eax, [esp+2Ch+arg_0]
push	ecx				; float
push	edx				; float
push	eax				; float
push	22h				; texture
call	sub_44EFF0
add	esp, 2Ch
pop	edi
pop	esi
pop	ebp
pop	ebx
retn
sub_439520 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_4396A0 proc	near			; CODE XREF: sub_439F50+3Ap

var_48=	dword ptr -48h
var_38=	dword ptr -38h
var_34=	dword ptr -34h
var_14=	dword ptr -14h
var_10=	dword ptr -10h
var_C= dword ptr -0Ch
var_8= dword ptr -8
var_4= dword ptr -4
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 14h
push	ebx
mov	ebx, [esp+18h+arg_4]
push	ebp
push	esi
push	edi
mov	edi, [esp+24h+arg_0]
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
mov	dword ptr dword_7CC4384, edi
mov	dword ptr dword_7CC4388, ebx
call	ds:glColor3f
call	sub_44E1C0
fild	[esp+24h+arg_4]
push	1				; float
push	1				; char
push	3F800000h			; float
xor	ebp, ebp
fstp	[esp+30h+var_14]
fild	[esp+30h+arg_0]
mov	eax, [esp+30h+var_14]
push	3F3E0000h			; float
push	ebp				; int
push	ebp				; int
fstp	[esp+3Ch+var_10]
mov	esi, [esp+3Ch+var_10]
push	43800000h			; float
push	433E0000h			; float
push	eax				; float
push	esi				; float
push	104h				; texture
call	sub_44EFF0
fld	[esp+50h+var_14]
add	esp, 2Ch
fadd	dword ptr flt_478960
push	1				; float
push	1				; char
push	3F310000h			; float
push	3F3E0000h			; float
push	ebp				; int
push	ebp				; int
push	43310000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+48h+var_48]		; float
push	esi				; float
push	105h				; texture
call	sub_44EFF0
push	1
call	sub_44E240
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
mov	esi, ds:SelectObject
add	esp, 30h
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
lea	eax, [eax+eax*2]
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 3
mul	ecx
shr	edx, 9
push	edx				; x
lea	edx, [ebx+0Ch]
push	offset byte_7B88FD8		; lpString
lea	eax, [edi+23h]
push	edx				; int
push	eax				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC88CC
add	esp, 18h
cmp	eax, ebp
jnz	short loc_4397EA
push	ebp				; int
push	ebp				; int
push	ebp				; x
add	ebx, 32h
push	offset byte_7B89104		; lpString
add	edi, 14h
push	ebx				; int
push	edi				; int
mov	dword ptr dword_47CEB4, ebp
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
call	sub_4273F0
add	esp, 18h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
; ---------------------------------------------------------------------------

loc_4397EA:				; CODE XREF: sub_4396A0+118j
fld	[esp+24h+var_10]
fadd	dword ptr flt_47893C
push	1				; float
push	1				; char
push	3F100000h			; float
push	3F620000h			; float
push	ebp				; int
push	ebp				; int
fstp	[esp+3Ch+var_8]
fld	[esp+3Ch+var_14]
fadd	dword ptr flt_478780
mov	edx, [esp+3Ch+var_8]
push	41900000h			; float
push	42E20000h			; float
fstp	[esp+44h+var_C]
mov	ecx, [esp+44h+var_C]
push	ecx				; float
push	edx				; float
push	10Fh				; texture
call	sub_44EFF0
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
add	esp, 2Ch
mov	dword ptr dword_47CEB4, ebp
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
fld	[esp+24h+var_C]
call	__ftol
fld	[esp+24h+var_8]
lea	esi, [eax+2]
call	__ftol
mov	edi, eax
push	ebp				; int
push	ebp				; int
push	ebp				; x
push	offset byte_7B89230		; lpString
lea	edx, [edi-26h]
push	esi				; int
push	edx				; int
call	sub_4273F0
push	ebp
push	ebp
add	edi, 5
push	esi
push	edi
mov	g_x1, 64h
call	sub_426F70
add	esp, 28h
mov	g_x1, 0FFh
mov	[esp+24h+var_C], ebp
mov	esi, offset byte_7CC3AA5

loc_4398AB:				; CODE XREF: sub_4396A0+275j
fild	[esp+24h+var_C]
xor	edi, edi
mov	[esp+24h+var_8], edi
fadd	[esp+24h+var_14]
fadd	dword ptr flt_4786CC
fadd	dword ptr flt_4786B8
fstp	[esp+24h+var_4]
mov	ebx, [esp+24h+var_4]

loc_4398CD:				; CODE XREF: sub_4396A0+262j
fild	[esp+24h+var_8]
xor	eax, eax
mov	al, [esi]
fadd	[esp+24h+var_10]
push	eax				; int
push	0Dh				; float
push	0Dh				; float
push	ebx				; float
fadd	dword ptr flt_4786D0
push	ecx
fadd	dword ptr flt_4786B8
fstp	[esp+38h+var_38]		; float
call	sub_439520
add	esp, 14h
add	edi, 0Fh
inc	esi
cmp	edi, 78h
mov	[esp+24h+var_8], edi
jl	short loc_4398CD
mov	ecx, [esp+24h+var_C]
add	ecx, 0Fh
cmp	esi, offset unk_7CC3AE5
mov	[esp+24h+var_C], ecx
jl	short loc_4398AB
xor	esi, esi
mov	[esp+24h+var_8], ebp

loc_43991D:				; CODE XREF: sub_4396A0+2DFj
fild	[esp+24h+var_8]
xor	edi, edi
mov	[esp+24h+var_8], edi
fadd	[esp+24h+var_14]
fadd	dword ptr flt_478860
fadd	dword ptr flt_4786B8
fstp	[esp+24h+var_4]
mov	ebx, [esp+24h+var_4]

loc_43993F:				; CODE XREF: sub_4396A0+2D3j
fild	[esp+24h+var_8]
push	esi				; int
push	12h				; float
push	12h				; float
push	ebx				; float
fadd	[esp+34h+var_10]
push	ecx
fadd	dword ptr flt_4786D4
fadd	dword ptr flt_4786B8
fstp	[esp+38h+var_38]		; float
call	sub_439520
add	esp, 14h
add	edi, 14h
inc	esi
cmp	edi, 0A0h
mov	[esp+24h+var_8], edi
jl	short loc_43993F
add	ebp, 14h
cmp	ebp, 28h
mov	[esp+24h+var_8], ebp
jl	short loc_43991D
fld	[esp+24h+var_14]
fadd	dword ptr flt_478970
mov	ecx, dword ptr dword_7CC8898
push	ecx				; int
push	17h				; float
fadd	dword ptr flt_4786B8
push	17h				; float
push	ecx
fstp	[esp+34h+var_34]		; float
fld	[esp+34h+var_10]
fadd	dword ptr flt_4786D4
push	ecx
fadd	dword ptr flt_4786B8
fstp	[esp+38h+var_38]		; float
call	sub_439520
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
add	esp, 14h
mov	dword ptr dword_47CEB4, 0
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	ds:SelectObject
mov	edi, [esp+24h+arg_4]
mov	ecx, [esp+24h+arg_0]
push	0				; int
push	0				; int
push	0				; x
lea	edx, [edi+0E6h]
lea	esi, [ecx+32h]
push	offset byte_7B8935C		; lpString
push	edx				; int
push	esi				; int
call	sub_4273F0
push	0				; int
push	0				; int
push	0				; x
add	edi, 0F5h
push	offset byte_7B89488		; lpString
push	edi				; int
push	esi				; int
call	sub_4273F0
add	esp, 30h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 14h
retn
sub_4396A0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_439A30 proc	near			; CODE XREF: sub_439F50+257p

var_B8=	dword ptr -0B8h
var_B4=	dword ptr -0B4h
var_80=	dword ptr -80h
var_7C=	dword ptr -7Ch
var_78=	dword ptr -78h
var_74=	dword ptr -74h
var_70=	dword ptr -70h
var_6C=	dword ptr -6Ch
var_68=	dword ptr -68h
String=	byte ptr -64h
arg_0= dword ptr  4
arg_4= dword ptr  8

sub	esp, 80h
push	ebx
push	ebp
mov	ebp, [esp+88h+arg_0]
push	esi
mov	esi, [esp+8Ch+arg_4]
push	edi
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
mov	dword ptr dword_7CB0044, ebp
mov	dword ptr dword_7CB0040, esi
call	ds:glColor3f
call	sub_44E1C0
fild	[esp+90h+arg_4]
push	1				; float
push	1				; char
push	3F800000h			; float
xor	ebx, ebx
fstp	[esp+9Ch+var_74]
fild	[esp+9Ch+arg_0]
mov	eax, [esp+9Ch+var_74]
push	3F3E0000h			; float
push	ebx				; int
push	ebx				; int
fstp	[esp+0A8h+var_68]
mov	edi, [esp+0A8h+var_68]
push	43800000h			; float
push	433E0000h			; float
push	eax				; float
push	edi				; float
push	104h				; texture
call	sub_44EFF0
fld	[esp+0BCh+var_74]
add	esp, 2Ch
fadd	dword ptr flt_478960
push	1				; float
push	1				; char
push	3F310000h			; float
push	3F3E0000h			; float
push	ebx				; int
push	ebx				; int
push	43310000h			; float
push	433E0000h			; float
push	ecx
fstp	[esp+0B4h+var_B4]		; float
push	edi				; float
push	105h				; texture
call	sub_44EFF0
push	1
call	sub_44E240
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
mov	edi, ds:SelectObject
add	esp, 30h
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr dword_79DBE88
mov	ax, [eax+194h]
cmp	ax, 0FFFFh
jnz	short loc_439B44
lea	ecx, [esp+90h+String]
push	offset byte_7B88FD8		; char *
push	ecx				; char *
call	_sprintf
add	esp, 8
jmp	short loc_439B6C
; ---------------------------------------------------------------------------

loc_439B44:				; CODE XREF: sub_439A30+FEj
mov	edx, dword ptr dword_7CC8890
lea	ecx, [esp+90h+String]
movsx	eax, ax
push	edx
lea	eax, [eax+eax*4]
shl	eax, 4
add	eax, offset byte_7CB026C
push	eax
push	offset aSScoreD			; "%s (Score:%d)"
push	ecx				; char *
call	_sprintf
add	esp, 10h

loc_439B6C:				; CODE XREF: sub_439A30+112j
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
lea	ecx, [esi+0Ch]
lea	eax, [eax+eax*2]
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 3
mul	edx
shr	edx, 9
lea	eax, [esp+98h+String]
push	edx				; x
push	eax				; lpString
lea	edx, [ebp+23h]
push	ecx				; int
push	edx				; int
call	sub_4273F0
mov	eax, dword ptr hfont1_54CA6A0
mov	ecx, dword ptr g_hdc2
add	esp, 18h
mov	dword ptr dword_47CEB4, ebx
mov	dword ptr dword_47CEAC, 0FFE6E6E6h
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	edi ; SelectObject
mov	eax, dword ptr dword_7CC888C
cmp	eax, ebx
jnz	short loc_439C07
push	ebx				; int
push	ebx				; int
push	ebx				; x
lea	edx, [esi+32h]
lea	edi, [ebp+14h]
push	offset byte_7B895B4		; lpString
push	edx				; int
push	edi				; int
call	sub_4273F0
push	ebx				; int
push	ebx				; int
push	ebx				; x
lea	eax, [esi+41h]
push	offset byte_7B896E0		; lpString
push	eax				; int
push	edi				; int
call	sub_4273F0
push	ebx				; int
push	ebx				; int
push	ebx				; x
lea	ecx, [esi+50h]
push	offset byte_7B8980C		; lpString
push	ecx				; int
push	edi				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC888C
add	esp, 48h

loc_439C07:				; CODE XREF: sub_439A30+194j
cmp	eax, 0Fh
mov	[esp+90h+var_6C], eax
jl	short loc_439C18
mov	[esp+90h+var_6C], 0Fh

loc_439C18:				; CODE XREF: sub_439A30+1DEj
mov	eax, [esp+90h+var_6C]
xor	ebp, ebp
cmp	eax, ebx
jle	loc_439F37
lea	edi, [esi+34h]
mov	[esp+90h+var_78], ebx
mov	[esp+90h+var_70], edi
jmp	short loc_439C37
; ---------------------------------------------------------------------------

loc_439C33:				; CODE XREF: sub_439A30+501j
mov	edi, [esp+90h+var_70]

loc_439C37:				; CODE XREF: sub_439A30+201j
mov	edx, dword ptr dword_7CC8888
lea	eax, [edx+ebp]
cmp	eax, ebx
lea	ecx, [eax+eax*2]
lea	esi, byte_7CB0048[ecx*4]
jnz	short loc_439C64
mov	dword ptr dword_47CEB4, 0FF962828h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
jmp	short loc_439C74
; ---------------------------------------------------------------------------

loc_439C64:				; CODE XREF: sub_439A30+21Cj
mov	dword ptr dword_47CEB4, ebx
mov	dword ptr dword_47CEAC, 0FFFFE6D2h

loc_439C74:				; CODE XREF: sub_439A30+232j
mov	edx, dword ptr hfont2_54CA6A4
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	ds:SelectObject
mov	ecx, dword ptr dword_7CC8888
add	ecx, ebp
test	ecx, ecx
jnz	short loc_439D04
mov	edx, dword ptr dword_79DBE88
movsx	eax, word ptr [edx+194h]
push	eax
call	sub_439340
fild	[esp+94h+var_78]
add	esp, 4
fadd	[esp+90h+var_74]
push	1				; float
push	1				; char
push	3F800000h			; float
push	3F800000h			; float
fadd	dword ptr flt_478974
push	ebx				; int
push	ebx				; int
push	41000000h			; float
push	41000000h			; float
push	ecx
fstp	[esp+0B4h+var_B4]		; float
fld	[esp+0B4h+var_68]
fadd	dword ptr flt_478710
push	ecx
fstp	[esp+0B8h+var_B8]		; float
push	22h				; texture
call	sub_44EFF0
mov	ecx, [esp+0BCh+arg_0]
push	ebx				; int
push	ebx				; int
push	ebx				; x
push	esi				; lpString
add	ecx, 1Eh
push	edi				; int
push	ecx				; int
call	sub_4273F0
add	esp, 44h
jmp	short loc_439D1C
; ---------------------------------------------------------------------------

loc_439D04:				; CODE XREF: sub_439A30+261j
mov	edx, [esp+90h+arg_0]
push	ebx				; int
push	ebx				; int
push	ebx				; x
push	esi				; lpString
add	edx, 14h
push	edi				; int
push	edx				; int
call	sub_4273F0
add	esp, 18h

loc_439D1C:				; CODE XREF: sub_439A30+2D2j
mov	eax, dword ptr dword_79DBE88
lea	esi, [eax+17Ch]
mov	eax, offset byte_7CB0048
mov	edi, esi

loc_439D2E:				; CODE XREF: sub_439A30+31Cj
mov	dl, [eax]
mov	cl, dl
cmp	dl, [edi]
jnz	short loc_439D52
cmp	cl, bl
jz	short loc_439D4E
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [edi+1]
jnz	short loc_439D52
add	eax, 2
add	edi, 2
cmp	cl, bl
jnz	short loc_439D2E

loc_439D4E:				; CODE XREF: sub_439A30+308j
xor	eax, eax
jmp	short loc_439D57
; ---------------------------------------------------------------------------

loc_439D52:				; CODE XREF: sub_439A30+304j
					; sub_439A30+312j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_439D57:				; CODE XREF: sub_439A30+320j
cmp	eax, ebx
jz	short loc_439D9D
mov	eax, dword ptr dword_7CC8888
add	eax, ebp
lea	ecx, [eax+eax*2]
lea	eax, byte_7CB0048[ecx*4]

loc_439D6C:				; CODE XREF: sub_439A30+35Aj
mov	dl, [eax]
mov	cl, dl
cmp	dl, [esi]
jnz	short loc_439D90
cmp	cl, bl
jz	short loc_439D8C
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [esi+1]
jnz	short loc_439D90
add	eax, 2
add	esi, 2
cmp	cl, bl
jnz	short loc_439D6C

loc_439D8C:				; CODE XREF: sub_439A30+346j
xor	eax, eax
jmp	short loc_439D95
; ---------------------------------------------------------------------------

loc_439D90:				; CODE XREF: sub_439A30+342j
					; sub_439A30+350j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_439D95:				; CODE XREF: sub_439A30+35Ej
cmp	eax, ebx
jnz	loc_439F11

loc_439D9D:				; CODE XREF: sub_439A30+329j
fild	dword ptr dword_7CB0044
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4787F0
push	ebx				; int
push	ebx				; int
push	41A00000h			; float
push	41C00000h			; float
fstp	[esp+0B0h+var_7C]
fild	[esp+0B0h+var_78]
mov	edi, [esp+0B0h+var_7C]
fiadd	dword ptr dword_7CB0040
fadd	dword ptr flt_478974
fstp	[esp+0B0h+var_80]
mov	esi, [esp+0B0h+var_80]
push	esi				; float
push	edi				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+90h+var_7C]
fnstsw	ax
test	ah, 1
jnz	loc_439F0F
fld	[esp+90h+var_7C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_439F11
fild	dword ptr dword_81C17B0
fcom	[esp+90h+var_80]
fnstsw	ax
test	ah, 1
jnz	loc_439F0F
fld	[esp+90h+var_80]
fadd	dword ptr flt_478710
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_439F11
cmp	byte_81C17F8, bl
jz	short loc_439E7F
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	ebx				; int
push	ebx				; int
push	41A00000h			; float
push	41C00000h			; float
push	esi				; float
push	edi				; float
push	119h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_439E7F:				; CODE XREF: sub_439A30+424j
mov	eax, dword ptr dword_7CC8888
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
add	eax, ebp
mov	dword ptr dword_47CEB4, 0FF000000h
test	eax, eax
jnz	short loc_439EE6
mov	ecx, dword ptr dword_79DBE88
mov	eax, offset byte_7CB0048
lea	esi, [ecx+17Ch]

loc_439EAF:				; CODE XREF: sub_439A30+49Dj
mov	dl, [eax]
mov	cl, dl
cmp	dl, [esi]
jnz	short loc_439ED3
cmp	cl, bl
jz	short loc_439ECF
mov	dl, [eax+1]
mov	cl, dl
cmp	dl, [esi+1]
jnz	short loc_439ED3
add	eax, 2
add	esi, 2
cmp	cl, bl
jnz	short loc_439EAF

loc_439ECF:				; CODE XREF: sub_439A30+489j
xor	eax, eax
jmp	short loc_439ED8
; ---------------------------------------------------------------------------

loc_439ED3:				; CODE XREF: sub_439A30+485j
					; sub_439A30+493j
sbb	eax, eax
sbb	eax, 0FFFFFFFFh

loc_439ED8:				; CODE XREF: sub_439A30+4A1j
cmp	eax, ebx
jnz	short loc_439EE6
push	ebx
push	ebx
push	ebx
push	offset byte_7B89938
jmp	short loc_439EEE
; ---------------------------------------------------------------------------

loc_439EE6:				; CODE XREF: sub_439A30+46Cj
					; sub_439A30+4AAj
push	ebx				; int
push	ebx				; int
push	ebx				; x
push	offset byte_7B89A64		; lpString

loc_439EEE:				; CODE XREF: sub_439A30+4B4j
fld	[esp+0A0h+var_80]
call	__ftol
fld	[esp+0A0h+var_7C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_439F11
; ---------------------------------------------------------------------------

loc_439F0F:				; CODE XREF: sub_439A30+3D1j
					; sub_439A30+3FFj
fstp	st

loc_439F11:				; CODE XREF: sub_439A30+367j
					; sub_439A30+3EAj ...
mov	edx, [esp+90h+var_78]
mov	ecx, [esp+90h+var_70]
mov	eax, 14h
inc	ebp
add	edx, eax
add	ecx, eax
mov	eax, [esp+90h+var_6C]
mov	[esp+90h+var_78], edx
cmp	ebp, eax
mov	[esp+90h+var_70], ecx
jl	loc_439C33

loc_439F37:				; CODE XREF: sub_439A30+1F0j
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 80h
retn
sub_439A30 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_439F50 proc	near			; CODE XREF: sub_42E970+7C8p

var_B0=	dword ptr -0B0h
var_AC=	dword ptr -0ACh
var_8C=	dword ptr -8Ch
var_88=	dword ptr -88h
String=	byte ptr -84h
var_20=	byte ptr -20h

sub	esp, 8Ch
push	ebx
mov	ebx, ds:glColor3f
push	ebp
push	esi
push	edi
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
call	sub_44E1C0
mov	al, byte_7CC88C4
test	al, al
jz	loc_43A185
push	0
push	1C2h
call	sub_4396A0
add	esp, 8
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_7CC4384
push	1				; float
push	1				; char
push	3F280000h			; float
push	400C0000h			; float
fadd	dword ptr flt_478710
push	0				; int
push	0				; int
push	41A80000h			; float
push	428C0000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC4388
mov	edi, [esp+0BCh+var_8C]
fadd	dword ptr flt_4789B0
fstp	[esp+0BCh+var_88]
mov	esi, [esp+0BCh+var_88]
push	esi				; float
push	edi				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43A067
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_4787D4
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A069
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A067
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_4789AC
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A069
push	1
push	1
push	3F280000h
push	3F0C0000h
push	0
push	0
push	41A80000h
push	428C0000h
push	esi
push	edi
push	0F2h
jmp	short loc_43A08C
; ---------------------------------------------------------------------------

loc_43A067:				; CODE XREF: sub_439F50+B5j
					; sub_439F50+DBj
fstp	st

loc_43A069:				; CODE XREF: sub_439F50+CAj
					; sub_439F50+F0j
push	1				; float
push	1				; char
push	3F280000h			; float
push	3F0C0000h			; float
push	0				; int
push	0				; int
push	41A80000h			; float
push	428C0000h			; float
push	esi				; float
push	edi				; float
push	0F1h				; texture

loc_43A08C:				; CODE XREF: sub_439F50+115j
call	sub_44EFF0
fild	dword ptr dword_7CC4384
add	esp, 2Ch
fadd	dword ptr flt_4786CC
push	1				; float
push	1				; char
push	3F280000h			; float
push	400C0000h			; float
push	0				; int
push	0				; int
fstp	[esp+0B4h+var_8C]
fild	dword ptr dword_7CC4388
mov	edi, [esp+0B4h+var_8C]
push	41A80000h			; float
push	428C0000h			; float
fadd	dword ptr flt_4789B0
fstp	[esp+0BCh+var_88]
mov	esi, [esp+0BCh+var_88]
push	esi				; float
push	edi				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43A158
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_4787D4
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A15A
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A158
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_4789AC
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A15A
push	1
push	1
push	3F280000h
push	3F0C0000h
push	0
push	0
push	41A80000h
push	428C0000h
push	esi
push	edi
push	0F4h
jmp	short loc_43A17D
; ---------------------------------------------------------------------------

loc_43A158:				; CODE XREF: sub_439F50+1A6j
					; sub_439F50+1CCj
fstp	st

loc_43A15A:				; CODE XREF: sub_439F50+1BBj
					; sub_439F50+1E1j
push	1				; float
push	1				; char
push	3F280000h			; float
push	3F0C0000h			; float
push	0				; int
push	0				; int
push	41A80000h			; float
push	428C0000h			; float
push	esi				; float
push	edi				; float
push	0F3h				; texture

loc_43A17D:				; CODE XREF: sub_439F50+206j
call	sub_44EFF0
add	esp, 2Ch

loc_43A185:				; CODE XREF: sub_439F50+2Dj
mov	al, byte_7CC88BC
mov	esi, ds:SelectObject
or	edi, 0FFFFFFFFh
mov	ebp, 0FF000000h
test	al, al
jz	loc_43A2AC
push	0
push	1C2h
call	sub_439A30
add	esp, 8
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_7CB0044
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4787B4
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CB0040
mov	ecx, [esp+0BCh+var_8C]
fadd	dword ptr flt_4789A8
fstp	[esp+0BCh+var_88]
mov	eax, [esp+0BCh+var_88]
push	eax				; float
push	ecx				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43A2AA
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A2AC
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A2AA
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A2AC
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, edi
mov	dword ptr dword_47CEB4, ebp
push	offset byte_7B8BEB8		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43A2AC
; ---------------------------------------------------------------------------

loc_43A2AA:				; CODE XREF: sub_439F50+2D2j
					; sub_439F50+2FCj
fstp	st

loc_43A2AC:				; CODE XREF: sub_439F50+24Aj
					; sub_439F50+2EBj ...
mov	al, byte_7CC88BD
test	al, al
jz	loc_43A3C5
push	0
push	1C2h
call	sub_438E60
add	esp, 8
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_7CC438C
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4787B4
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC4390
mov	edx, [esp+0BCh+var_8C]
fadd	dword ptr flt_4789A8
fstp	[esp+0BCh+var_88]
mov	ecx, [esp+0BCh+var_88]
push	ecx				; float
push	edx				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43A3C3
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A3C5
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A3C3
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A3C5
mov	eax, dword ptr hfont1_54CA6A0
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, edi
mov	dword ptr dword_47CEB4, ebp
push	offset byte_7B8BFE4		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43A3C5
; ---------------------------------------------------------------------------

loc_43A3C3:				; CODE XREF: sub_439F50+3EBj
					; sub_439F50+415j
fstp	st

loc_43A3C5:				; CODE XREF: sub_439F50+363j
					; sub_439F50+404j ...
mov	al, byte_7CC88BE
test	al, al
jz	loc_43A4DF
push	0
push	1C2h
call	sub_4381E0
add	esp, 8
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_7CC7FE4
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4787B4
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC7FE8
mov	eax, [esp+0BCh+var_8C]
fadd	dword ptr flt_4789A8
fstp	[esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_88]
push	edx				; float
push	eax				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43A4DD
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A4DF
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A4DD
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A4DF
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, edi
mov	dword ptr dword_47CEB4, ebp
push	offset byte_7B8C110		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43A4DF
; ---------------------------------------------------------------------------

loc_43A4DD:				; CODE XREF: sub_439F50+504j
					; sub_439F50+52Ej
fstp	st

loc_43A4DF:				; CODE XREF: sub_439F50+47Cj
					; sub_439F50+51Dj ...
mov	al, byte_7CC88BF
test	al, al
jz	loc_43A79C
mov	al, byte_7CC88BE
test	al, al
jnz	short loc_43A503
mov	al, byte_7CC88BD
test	al, al
mov	eax, 1C2h
jz	short loc_43A508

loc_43A503:				; CODE XREF: sub_439F50+5A3j
mov	eax, 104h

loc_43A508:				; CODE XREF: sub_439F50+5B1j
push	0				; int
push	0				; float
push	eax				; float
mov	dword ptr dword_7CC3AF0, eax
mov	dword ptr dword_7CC3AEC, 0
call	sub_438120
add	esp, 0Ch
call	sub_436440
fild	dword ptr dword_7CC3AEC
push	8				; int
push	8				; int
push	offset word_7CC6C78		; float
push	ecx
fadd	dword ptr flt_478854
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC3AF0
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
add	esp, 14h
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
mov	ecx, dword ptr dword_7CC3AF0
push	3				; int
push	1				; int
lea	eax, [eax+eax*2]
add	ecx, 23h
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 3
mul	edx
mov	eax, dword ptr dword_7CC3AEC
shr	edx, 9
push	edx				; x
add	eax, 0Ch
push	offset byte_7B8C23C		; lpString
push	eax				; int
push	ecx				; int
call	sub_4273F0
fild	dword ptr dword_7CC3AF0
push	1				; float
push	1				; char
push	3F100000h			; float
push	3F620000h			; float
fadd	dword ptr flt_4786D0
push	0				; int
push	0				; int
push	41900000h			; float
push	42E20000h			; float
fstp	[esp+0D4h+var_8C]
fild	dword ptr dword_7CC3AEC
mov	eax, [esp+0D4h+var_8C]
fadd	dword ptr flt_4789A4
fstp	[esp+0D4h+var_88]
mov	edx, [esp+0D4h+var_88]
push	edx				; float
push	eax				; float
push	10Fh				; texture
call	sub_44EFF0
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
add	esp, 44h
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
mov	ecx, dword ptr newData570h_7B786D4
lea	eax, [esp+9Ch+String]
push	eax				; char *
mov	edx, [ecx+538h]
push	edx				; int
call	sub_4321F0
fld	[esp+0A4h+var_88]
mov	dword ptr dword_47CEB4, 0FF282828h
mov	dword ptr dword_47CEAC, 0FF96DCFFh
call	__ftol
fld	[esp+0A4h+var_8C]
lea	edi, [eax+3]
call	__ftol
mov	ebp, eax
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C368		; lpString
lea	eax, [ebp-1Eh]
push	edi				; int
push	eax				; int
call	sub_4273F0
push	0				; int
push	0				; int
lea	ecx, [esp+0C4h+String]
push	0				; x
push	ecx				; lpString
add	ebp, 0Ah
push	edi				; int
push	ebp				; int
call	sub_4273F0
fild	dword ptr dword_7CC3AF0
mov	al, byte_7CC88C3
add	esp, 38h
test	al, al
fadd	dword ptr flt_4787B4
fstp	[esp+9Ch+var_8C]
fild	dword ptr dword_7CC3AEC
fadd	dword ptr flt_4789A8
fstp	[esp+9Ch+var_88]
jnz	loc_43A7A9
mov	edx, [esp+9Ch+var_88]
mov	eax, [esp+9Ch+var_8C]
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	edx				; float
push	eax				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43A79A
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A79C
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43A79A
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43A79C
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
mov	dword ptr dword_47CEB4, 0FF000000h
push	offset byte_7B8C494		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43A79C
; ---------------------------------------------------------------------------

loc_43A79A:				; CODE XREF: sub_439F50+7B9j
					; sub_439F50+7E3j
fstp	st

loc_43A79C:				; CODE XREF: sub_439F50+596j
					; sub_439F50+7D2j ...
mov	al, byte_7CC88C3
test	al, al
jz	loc_43AE6A

loc_43A7A9:				; CODE XREF: sub_439F50+771j
push	1				; int
push	0				; float
push	104h				; float
mov	dword ptr dword_7CC3AF8, 104h
mov	dword ptr dword_7CC3AF4, 0
call	sub_438120
fild	dword ptr dword_7CC3AF4
add	esp, 0Ch
fadd	dword ptr flt_4787D4
push	4				; int
push	8				; int
push	offset word_7CC3B00		; float
push	ecx
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
fild	dword ptr dword_7CC3AF4
add	esp, 14h
fadd	dword ptr flt_4786EC
push	4				; int
push	8				; int
push	offset word_7CC63F0		; float
push	ecx
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
add	esp, 14h
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
mov	ecx, dword ptr dword_7CC3AF8
push	3				; int
push	1				; int
lea	eax, [eax+eax*2]
add	ecx, 23h
mov	dword ptr dword_47CEB4, 0FF141414h
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
lea	edx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	edx, 3
mul	edx
mov	eax, dword ptr dword_7CC3AF4
shr	edx, 9
push	edx				; x
add	eax, 0Ch
push	offset byte_7B8C5C0		; lpString
push	eax				; int
push	ecx				; int
call	sub_4273F0
fild	dword ptr dword_7CC3AF8
mov	eax, dword ptr dword_7CC88B0
add	esp, 18h
test	eax, eax
fadd	dword ptr flt_4789A0
fstp	[esp+9Ch+var_8C]
fild	dword ptr dword_7CC3AF4
fadd	dword ptr flt_47899C
fstp	[esp+9Ch+var_88]
jle	short loc_43A8D0
push	0
push	0
jmp	short loc_43A8DA
; ---------------------------------------------------------------------------

loc_43A8D0:				; CODE XREF: sub_439F50+978j
push	3F800000h			; blue
push	3F800000h			; green

loc_43A8DA:				; CODE XREF: sub_439F50+97Ej
push	3F800000h			; red
call	ebx ; glColor3f
mov	al, byte_7CC88AC
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
test	al, al
push	41C00000h			; float
jnz	short loc_43A917
mov	edx, [esp+0BCh+var_88]
mov	eax, [esp+0BCh+var_8C]
push	edx
push	eax
push	122h
jmp	short loc_43A926
; ---------------------------------------------------------------------------

loc_43A917:				; CODE XREF: sub_439F50+9B4j
mov	ecx, [esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_8C]
push	ecx				; float
push	edx				; float
push	123h				; texture

loc_43A926:				; CODE XREF: sub_439F50+9C5j
call	sub_44EFF0
add	esp, 2Ch
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_7CC3AF8
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4788B8
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
mov	dword ptr dword_47CEB4, 0FF000000h
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC3AF4
mov	ebp, [esp+0BCh+var_8C]
fadd	dword ptr flt_478998
fstp	[esp+0BCh+var_88]
mov	edi, [esp+0BCh+var_88]
push	edi				; float
push	ebp				; float
push	110h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43AA6D
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_43AA6F
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	loc_43AA6D
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43AA6F
mov	al, byte_81C17F8
test	al, al
jz	short loc_43AA32
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	edi				; float
push	ebp				; float
push	111h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_43AA32:				; CODE XREF: sub_439F50+AB5j
mov	eax, dword ptr hfont1_54CA6A0
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C6EC		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43AA6F
; ---------------------------------------------------------------------------

loc_43AA6D:				; CODE XREF: sub_439F50+A65j
					; sub_439F50+A93j
fstp	st

loc_43AA6F:				; CODE XREF: sub_439F50+A7Ej
					; sub_439F50+AACj ...
fild	dword ptr dword_7CC3AF8
mov	eax, dword ptr dword_7CC88B4
test	eax, eax
fadd	dword ptr flt_478914
fstp	[esp+9Ch+var_8C]
fild	dword ptr dword_7CC3AF4
fadd	dword ptr flt_478998
fstp	[esp+9Ch+var_88]
jle	short loc_43AA9E
push	0
push	0
jmp	short loc_43AAA8
; ---------------------------------------------------------------------------

loc_43AA9E:				; CODE XREF: sub_439F50+B46j
push	3F800000h			; blue
push	3F800000h			; green

loc_43AAA8:				; CODE XREF: sub_439F50+B4Cj
push	3F800000h			; red
call	ebx ; glColor3f
mov	al, byte_7CC88AD
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
test	al, al
push	41C00000h			; float
jnz	short loc_43AAE5
mov	edx, [esp+0BCh+var_88]
mov	eax, [esp+0BCh+var_8C]
push	edx
push	eax
push	122h
jmp	short loc_43AAF4
; ---------------------------------------------------------------------------

loc_43AAE5:				; CODE XREF: sub_439F50+B82j
mov	ecx, [esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_8C]
push	ecx				; float
push	edx				; float
push	123h				; texture

loc_43AAF4:				; CODE XREF: sub_439F50+B93j
call	sub_44EFF0
add	esp, 2Ch
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
fild	dword ptr dword_81C17B4
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43AB94
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43AB96
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43AB94
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43AB96
mov	eax, dword ptr hfont1_54CA6A0
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C818		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43AB96
; ---------------------------------------------------------------------------

loc_43AB94:				; CODE XREF: sub_439F50+BCCj
					; sub_439F50+BF2j
fstp	st

loc_43AB96:				; CODE XREF: sub_439F50+BE1j
					; sub_439F50+C07j ...
fild	dword ptr dword_7CC3AF8
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4789A0
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC3AF4
mov	eax, [esp+0BCh+var_8C]
fadd	dword ptr flt_478998
fstp	[esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_88]
push	edx				; float
push	eax				; float
push	118h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43AC71
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43AC73
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43AC71
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43AC73
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C944		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43AC73
; ---------------------------------------------------------------------------

loc_43AC71:				; CODE XREF: sub_439F50+CA8j
					; sub_439F50+CCEj
fstp	st

loc_43AC73:				; CODE XREF: sub_439F50+CBDj
					; sub_439F50+CE3j ...
fild	dword ptr dword_7CC3AF8
push	1				; float
push	1				; char
push	3F100000h			; float
push	3F620000h			; float
fadd	dword ptr flt_4786D0
push	0				; int
push	0				; int
push	41900000h			; float
push	42E20000h			; float
mov	dword ptr dword_47CEAC, 0FF96DCFFh
mov	dword ptr dword_47CEB4, 80282828h
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC3AF4
mov	ecx, [esp+0BCh+var_8C]
fadd	dword ptr flt_478994
fstp	[esp+0BCh+var_88]
mov	eax, [esp+0BCh+var_88]
push	eax				; float
push	ecx				; float
push	10Fh				; texture
call	sub_44EFF0
mov	edx, dword ptr hfont2_54CA6A4
mov	eax, dword ptr g_hdc2
add	esp, 2Ch
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
call	__ftol
fld	[esp+9Ch+var_8C]
lea	edi, [eax+2]
call	__ftol
mov	ebp, eax
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C368		; lpString
lea	ecx, [ebp-1Eh]
push	edi				; int
push	ecx				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC88A4
lea	edx, [esp+0B4h+String]
push	edx				; char *
push	eax				; int
call	sub_4321F0
push	0				; int
push	0				; int
lea	ecx, [esp+0C4h+String]
push	0				; x
push	ecx				; lpString
add	ebp, 0Ah
push	edi				; int
push	ebp				; int
call	sub_4273F0
fild	dword ptr dword_7CC3AF8
push	1				; float
push	1				; char
push	3F100000h			; float
push	3F620000h			; float
fadd	dword ptr flt_4786D0
push	0				; int
push	0				; int
push	41900000h			; float
push	42E20000h			; float
fstp	[esp+0F4h+var_8C]
fild	dword ptr dword_7CC3AF4
mov	eax, [esp+0F4h+var_8C]
fadd	dword ptr flt_4786FC
fstp	[esp+0F4h+var_88]
mov	edx, [esp+0F4h+var_88]
push	edx				; float
push	eax				; float
push	10Fh				; texture
call	sub_44EFF0
fld	[esp+100h+var_88]
add	esp, 64h
call	__ftol
fld	[esp+9Ch+var_8C]
lea	edi, [eax+2]
call	__ftol
mov	ebp, eax
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C368		; lpString
lea	ecx, [ebp-1Eh]
push	edi				; int
push	ecx				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC88A8
lea	edx, [esp+0B4h+String]
push	edx				; char *
push	eax				; int
call	sub_4321F0
push	0				; int
push	0				; int
lea	ecx, [esp+0C4h+String]
push	0				; x
push	ecx				; lpString
add	ebp, 0Ah
push	edi				; int
push	ebp				; int
call	sub_4273F0
mov	edx, dword ptr hfont3_54CA6A8
mov	eax, dword ptr g_hdc2
add	esp, 38h
mov	dword ptr dword_47CEAC, 0FFFFE6D2h
mov	dword ptr dword_47CEB4, 80282828h
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
mov	ecx, dword ptr dword_7CC3AF4
mov	edx, dword ptr dword_7CC3AF8
push	0				; int
push	0				; int
push	0				; x
add	ecx, 2Dh
push	offset dword_7CC7FEC		; lpString
add	edx, 14h
push	ecx				; int
push	edx				; int
call	sub_4273F0
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
add	esp, 18h
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
mov	edx, dword ptr dword_79DBE88
mov	eax, dword ptr dword_7CC3AF4
mov	ecx, dword ptr dword_7CC3AF8
push	0				; int
push	0				; int
add	edx, 17Ch
push	0				; x
add	eax, 0FAh
push	edx				; lpString
add	ecx, 14h
push	eax				; int
push	ecx				; int
call	sub_4273F0
add	esp, 18h

loc_43AE6A:				; CODE XREF: sub_439F50+853j
mov	al, byte_7CC88C0
test	al, al
jz	loc_43B220
push	0				; int
push	0				; float
push	104h				; float
mov	dword ptr dword_7CC8880, 104h
mov	dword ptr dword_7CC8884, 0
call	sub_438120
fild	dword ptr dword_7CC8884
add	esp, 0Ch
fadd	dword ptr flt_4786D0
push	0Fh				; int
push	8				; int
push	offset byte_7CC4398		; float
push	ecx
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
add	esp, 14h
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
mov	edx, dword ptr hfont2_54CA6A4
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0FF141414h
lea	eax, [eax+eax*2]
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 3
mul	ecx
mov	eax, dword ptr dword_7CC8880
shr	edx, 9
push	edx				; x
mov	edx, dword ptr dword_7CC8884
add	edx, 0Ch
push	offset byte_7B8CA70		; lpString
add	eax, 23h
push	edx				; int
push	eax				; int
call	sub_4273F0
fild	dword ptr dword_7CC8880
mov	al, byte_7CC88D0
add	esp, 18h
test	al, al
fadd	dword ptr flt_4787B4
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
fstp	[esp+0B4h+var_8C]
fild	dword ptr dword_7CC8884
push	41C00000h			; float
push	41C00000h			; float
fadd	dword ptr flt_478990
fstp	[esp+0BCh+var_88]
jnz	short loc_43AF94
mov	ecx, [esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_8C]
push	ecx
push	edx
push	11Bh
jmp	short loc_43AFA3
; ---------------------------------------------------------------------------

loc_43AF94:				; CODE XREF: sub_439F50+1031j
mov	eax, [esp+0BCh+var_88]
mov	ecx, [esp+0BCh+var_8C]
push	eax				; float
push	ecx				; float
push	11Ah				; texture

loc_43AFA3:				; CODE XREF: sub_439F50+1042j
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43B032
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B034
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43B032
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B034
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8CB9C		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Ch
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43B034
; ---------------------------------------------------------------------------

loc_43B032:				; CODE XREF: sub_439F50+106Aj
					; sub_439F50+1090j
fstp	st

loc_43B034:				; CODE XREF: sub_439F50+107Fj
					; sub_439F50+10A5j ...
fild	dword ptr dword_7CC8880
mov	al, byte_7CC88D0
push	1				; float
push	1				; char
push	3F400000h			; float
fadd	dword ptr flt_47893C
push	3F400000h			; float
push	0				; int
push	0				; int
cmp	al, 1
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC8884
fadd	dword ptr flt_478990
fstp	[esp+0BCh+var_88]
jnz	short loc_43B08A
mov	ecx, [esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_8C]
push	ecx
push	edx
push	11Dh
jmp	short loc_43B099
; ---------------------------------------------------------------------------

loc_43B08A:				; CODE XREF: sub_439F50+1127j
mov	eax, [esp+0BCh+var_88]
mov	ecx, [esp+0BCh+var_8C]
push	eax				; float
push	ecx				; float
push	11Ch				; texture

loc_43B099:				; CODE XREF: sub_439F50+1138j
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43B128
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B12A
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43B128
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B12A
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8CCC8		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Ch
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43B12A
; ---------------------------------------------------------------------------

loc_43B128:				; CODE XREF: sub_439F50+1160j
					; sub_439F50+1186j
fstp	st

loc_43B12A:				; CODE XREF: sub_439F50+1175j
					; sub_439F50+119Bj ...
fild	dword ptr dword_7CC8880
mov	al, byte_7CC88D0
push	1				; float
push	1				; char
push	3F400000h			; float
fadd	dword ptr flt_47898C
push	3F400000h			; float
push	0				; int
push	0				; int
cmp	al, 2
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC8884
fadd	dword ptr flt_478990
fstp	[esp+0BCh+var_88]
jnz	short loc_43B180
mov	ecx, [esp+0BCh+var_88]
mov	edx, [esp+0BCh+var_8C]
push	ecx
push	edx
push	11Fh
jmp	short loc_43B18F
; ---------------------------------------------------------------------------

loc_43B180:				; CODE XREF: sub_439F50+121Dj
mov	eax, [esp+0BCh+var_88]
mov	ecx, [esp+0BCh+var_8C]
push	eax				; float
push	ecx				; float
push	11Eh				; texture

loc_43B18F:				; CODE XREF: sub_439F50+122Ej
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	short loc_43B21E
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B220
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	short loc_43B21E
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B220
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8CDF4		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Ch
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43B220
; ---------------------------------------------------------------------------

loc_43B21E:				; CODE XREF: sub_439F50+1256j
					; sub_439F50+127Cj
fstp	st

loc_43B220:				; CODE XREF: sub_439F50+F21j
					; sub_439F50+126Bj ...
mov	al, byte_7CC88C2
test	al, al
jz	loc_43B5D0
push	0				; int
push	0				; float
push	104h				; float
mov	dword ptr dword_7CC8880, 104h
mov	dword ptr dword_7CC8884, 0
call	sub_438120
fild	dword ptr dword_7CC8884
add	esp, 0Ch
fadd	dword ptr flt_478988
push	4				; int
push	8				; int
push	offset byte_7CC8000		; float
push	ecx
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
add	esp, 14h
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0FF141414h
lea	eax, [eax+eax*2]
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 3
mul	ecx
mov	eax, dword ptr dword_7CC8880
shr	edx, 9
push	edx				; x
mov	edx, dword ptr dword_7CC8884
add	edx, 0Ch
push	offset byte_7BA681C		; lpString
add	eax, 23h
push	edx				; int
push	eax				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC88C8
add	esp, 18h
test	eax, eax
jnz	loc_43B5D0
mov	ecx, dword ptr dword_7CC3AE8
mov	eax, 68DB8BADh
imul	ecx
sar	edx, 0Dh
mov	ecx, edx
mov	dword ptr dword_47CEAC, 0FFFFE6D2h
shr	ecx, 1Fh
add	edx, ecx
mov	dword ptr dword_47CEB4, 80282828h
mov	edi, edx
cmp	edi, 64h
jle	short loc_43B339
mov	edi, 64h

loc_43B339:				; CODE XREF: sub_439F50+13E2j
push	edi
lea	edx, [esp+0A0h+String]
push	offset byte_7BA6948		; char *
push	edx				; char *
call	_sprintf
mov	ecx, dword ptr dword_7CC8884
mov	edx, dword ptr dword_7CC8880
push	0				; int
push	0				; int
lea	eax, [esp+0B0h+String]
push	0				; x
add	ecx, 3Ch
push	eax				; lpString
add	edx, 14h
push	ecx				; int
push	edx				; int
call	sub_4273F0
lea	eax, [esp+0C0h+var_20]
push	eax				; char *
lea	eax, [edi+edi*4]
lea	eax, [eax+eax*4]
lea	eax, [eax+eax*4]
lea	ecx, [eax+eax*4]
shl	ecx, 4
push	ecx				; int
call	sub_4321F0
lea	edx, [esp+0C8h+var_20]
lea	eax, [esp+0C8h+String]
push	edx
push	offset byte_7BA6A74		; char *
push	eax				; char *
call	_sprintf
mov	edx, dword ptr dword_7CC8884
mov	eax, dword ptr dword_7CC8880
push	0				; int
push	0				; int
lea	ecx, [esp+0DCh+String]
push	0				; x
add	edx, 50h
push	ecx				; lpString
add	eax, 14h
push	edx				; int
push	eax				; int
call	sub_4273F0
mov	ecx, dword ptr dword_7CC8884
mov	edx, dword ptr dword_7CC8880
add	esp, 50h
add	ecx, 0D2h
add	edx, 14h
mov	dword ptr dword_47CEAC, 0FF1432FFh
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7BA6BA0		; lpString
push	ecx				; int
push	edx				; int
mov	dword ptr dword_47CEB4, 80282828h
call	sub_4273F0
mov	eax, dword ptr dword_7CC8884
mov	ecx, dword ptr dword_7CC8880
push	0				; int
push	0				; int
push	0				; x
add	eax, 0E1h
push	offset byte_7BA6CCC		; lpString
add	ecx, 14h
push	eax				; int
push	ecx				; int
call	sub_4273F0
mov	edx, dword ptr dword_7CC8884
mov	eax, dword ptr dword_7CC8880
push	0				; int
push	0				; int
push	0				; x
add	edx, 0F0h
push	offset byte_7BA6DF8		; lpString
add	eax, 14h
push	edx				; int
push	eax				; int
call	sub_4273F0
add	esp, 48h
mov	ecx, dword ptr dword_7CC8884
mov	edx, dword ptr dword_7CC8880
push	0				; int
push	0				; int
push	0				; x
add	ecx, 0FFh
push	offset byte_7BA6F24		; lpString
add	edx, 14h
push	ecx				; int
push	edx				; int
call	sub_4273F0
mov	eax, dword ptr dword_7CC8884
mov	ecx, dword ptr dword_7CC8880
push	0				; int
push	0				; int
push	0				; x
add	eax, 10Eh
push	offset byte_7BA7050		; lpString
add	ecx, 14h
push	eax				; int
push	ecx				; int
call	sub_4273F0
fild	dword ptr dword_7CC8880
push	1				; float
push	1				; char
push	3F800000h			; float
push	3F300000h			; float
fadd	dword ptr flt_47894C
push	0				; int
push	0				; int
push	42000000h			; float
push	42300000h			; float
fstp	[esp+0ECh+var_8C]
fild	dword ptr dword_7CC8884
mov	ebp, [esp+0ECh+var_8C]
fadd	dword ptr flt_478984
fstp	[esp+0ECh+var_88]
mov	edi, [esp+0ECh+var_88]
push	edi				; float
push	ebp				; float
push	124h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 5Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43B5CE
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478980
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_43B5D0
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	loc_43B5CE
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478838
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_43B5D0
mov	al, byte_81C17F8
test	al, al
jz	short loc_43B57F
push	1				; float
push	1				; char
push	3F800000h			; float
push	3F300000h			; float
push	0				; int
push	0				; int
push	42000000h			; float
push	42300000h			; float
push	edi				; float
push	ebp				; float
push	125h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_43B57F:				; CODE XREF: sub_439F50+1602j
mov	edx, dword ptr hfont1_54CA6A0
mov	eax, dword ptr g_hdc2
push	edx				; hfont2_54CA6A4
push	eax				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
mov	dword ptr dword_47CEB4, 80282828h
push	offset byte_7BA717C		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43B5D0
; ---------------------------------------------------------------------------

loc_43B5CE:				; CODE XREF: sub_439F50+15AEj
					; sub_439F50+15DCj
fstp	st

loc_43B5D0:				; CODE XREF: sub_439F50+12D7j
					; sub_439F50+13ACj ...
mov	al, byte_7CC88C1
test	al, al
jz	loc_43B9C5
push	0				; int
push	0				; float
push	104h				; float
mov	dword ptr dword_7CC8880, 104h
mov	dword ptr dword_7CC8884, 0
call	sub_438120
fild	dword ptr dword_7CC8884
add	esp, 0Ch
fadd	dword ptr flt_4786D0
push	0Fh				; int
push	8				; int
push	offset byte_7CC4398		; float
push	ecx
fstp	[esp+0ACh+var_AC]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+0B0h+var_B0]		; float
call	sub_436AD0
add	esp, 14h
push	3F800000h			; blue
push	3F800000h			; green
push	3F800000h			; red
call	ebx ; glColor3f
mov	ecx, dword ptr hfont2_54CA6A4
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr g_wndWidth
push	3				; int
push	1				; int
mov	dword ptr dword_47CEB4, 0FF141414h
lea	eax, [eax+eax*2]
mov	dword ptr dword_47CEAC, 0FFDCDCDCh
lea	ecx, [eax+eax*4]
mov	eax, 0CCCCCCCDh
shl	ecx, 3
mul	ecx
mov	eax, dword ptr dword_7CC8880
shr	edx, 9
push	edx				; x
mov	edx, dword ptr dword_7CC8884
add	edx, 0Ch
push	offset byte_7B8CF20		; lpString
add	eax, 23h
push	edx				; int
push	eax				; int
call	sub_4273F0
fild	dword ptr dword_7CC8880
push	1				; float
push	1				; char
push	3F100000h			; float
push	3F620000h			; float
fadd	dword ptr flt_4786D0
push	0				; int
push	0				; int
push	41900000h			; float
push	42E20000h			; float
fstp	[esp+0D4h+var_8C]
fild	dword ptr dword_7CC8884
mov	edx, [esp+0D4h+var_8C]
fadd	dword ptr flt_47897C
fstp	[esp+0D4h+var_88]
mov	ecx, [esp+0D4h+var_88]
push	ecx				; float
push	edx				; float
push	10Fh				; texture
call	sub_44EFF0
mov	eax, dword ptr hfont2_54CA6A4
mov	ecx, dword ptr g_hdc2
add	esp, 44h
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
mov	eax, dword ptr newData570h_7B786D4
lea	edx, [esp+9Ch+String]
push	edx				; char *
mov	ecx, [eax+53Ch]
push	ecx				; int
call	sub_4321F0
fld	[esp+0A4h+var_88]
mov	dword ptr dword_47CEB4, 0FF282828h
mov	dword ptr dword_47CEAC, 0FF96DCFFh
call	__ftol
fld	[esp+0A4h+var_8C]
lea	edi, [eax+3]
call	__ftol
mov	ebp, eax
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8C368		; lpString
lea	edx, [ebp-1Eh]
push	edi				; int
push	edx				; int
call	sub_4273F0
push	0				; int
push	0				; int
lea	eax, [esp+0C4h+String]
push	0				; x
push	eax				; lpString
add	ebp, 0Ah
push	edi				; int
push	ebp				; int
call	sub_4273F0
fild	dword ptr dword_7CC8880
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_4788B8
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
mov	dword ptr dword_47CEAC, 0FFFFFFFFh
mov	dword ptr dword_47CEB4, 0FF000000h
fstp	[esp+0F4h+var_8C]
fild	dword ptr dword_7CC8884
mov	ebp, [esp+0F4h+var_8C]
fadd	dword ptr flt_478998
fstp	[esp+0F4h+var_88]
mov	edi, [esp+0F4h+var_88]
push	edi				; float
push	ebp				; float
push	110h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 64h
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43B89E
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_43B8A0
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	loc_43B89E
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B8A0
mov	al, byte_81C17F8
test	al, al
jz	short loc_43B862
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	edi				; float
push	ebp				; float
push	111h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_43B862:				; CODE XREF: sub_439F50+18E5j
mov	ecx, dword ptr hfont1_54CA6A0
mov	edx, dword ptr g_hdc2
push	ecx				; hfont2_54CA6A4
push	edx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8D04C		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
jmp	short loc_43B8A0
; ---------------------------------------------------------------------------

loc_43B89E:				; CODE XREF: sub_439F50+1895j
					; sub_439F50+18C3j
fstp	st

loc_43B8A0:				; CODE XREF: sub_439F50+18AEj
					; sub_439F50+18DCj ...
fild	dword ptr dword_7CC8880
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
fadd	dword ptr flt_478978
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
fstp	[esp+0BCh+var_8C]
fild	dword ptr dword_7CC8884
mov	ebx, [esp+0BCh+var_8C]
fadd	dword ptr flt_478998
fstp	[esp+0BCh+var_88]
mov	edi, [esp+0BCh+var_88]
push	edi				; float
push	ebx				; float
push	110h				; texture
call	sub_44EFF0
fild	dword ptr dword_81C17B4
add	esp, 2Ch
fcom	[esp+9Ch+var_8C]
fnstsw	ax
test	ah, 1
jnz	loc_43B9C3
fld	[esp+9Ch+var_8C]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	loc_43B9C5
fild	dword ptr dword_81C17B0
fcom	[esp+9Ch+var_88]
fnstsw	ax
test	ah, 1
jnz	loc_43B9C3
fld	[esp+9Ch+var_88]
fadd	dword ptr flt_478834
fxch	st(1)
fcompp
fnstsw	ax
test	ah, 1
jz	short loc_43B9C5
mov	al, byte_81C17F8
test	al, al
jz	short loc_43B97F
push	1				; float
push	1				; char
push	3F400000h			; float
push	3F400000h			; float
push	0				; int
push	0				; int
push	41C00000h			; float
push	41C00000h			; float
push	edi				; float
push	ebx				; float
push	111h				; texture
call	sub_44EFF0
add	esp, 2Ch

loc_43B97F:				; CODE XREF: sub_439F50+1A02j
mov	eax, dword ptr hfont1_54CA6A0
mov	ecx, dword ptr g_hdc2
push	eax				; hfont2_54CA6A4
push	ecx				; g_hdc2
call	esi ; SelectObject
fld	[esp+9Ch+var_88]
push	0				; int
push	0				; int
push	0				; x
push	offset byte_7B8D178		; lpString
call	__ftol
fld	[esp+0ACh+var_8C]
sub	eax, 0Dh
push	eax				; int
call	__ftol
push	eax				; int
call	sub_4273F0
add	esp, 18h
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn
; ---------------------------------------------------------------------------

loc_43B9C3:				; CODE XREF: sub_439F50+19B2j
					; sub_439F50+19E0j
fstp	st

loc_43B9C5:				; CODE XREF: sub_439F50+1687j
					; sub_439F50+19CBj ...
pop	edi
pop	esi
pop	ebp
pop	ebx
add	esp, 8Ch
retn
sub_439F50 endp


; =============== S U B	R O U T	I N E =======================================


sub_43B9D0 proc	near			; CODE XREF: sub_42E970+126Cp

var_18=	dword ptr -18h
var_14=	dword ptr -14h

mov	al, byte_7CC88BF
test	al, al
jz	short loc_43BA11
call	sub_436840
fild	dword ptr dword_7CC3AEC
push	0				; char
push	8				; float
push	8				; int
push	offset word_7CC6C78		; int
fadd	dword ptr flt_478854
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF0
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BA11:				; CODE XREF: sub_43B9D0+7j
mov	al, byte_7CC88C0
test	al, al
jz	short loc_43BA4D
fild	dword ptr dword_7CC8884
push	0				; char
push	0Fh				; float
push	8				; int
push	offset byte_7CC4398		; int
fadd	dword ptr flt_4786D0
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BA4D:				; CODE XREF: sub_43B9D0+48j
mov	al, byte_7CC88C3
test	al, al
jz	short loc_43BABC
fild	dword ptr dword_7CC3AF4
push	0				; char
push	4				; float
push	8				; int
push	offset word_7CC3B00		; int
fadd	dword ptr flt_4787D4
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
fild	dword ptr dword_7CC3AF4
add	esp, 18h
fadd	dword ptr flt_4786EC
push	0				; char
push	4				; float
push	8				; int
push	offset word_7CC63F0		; int
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BABC:				; CODE XREF: sub_43B9D0+84j
mov	al, byte_7CC88C1
test	al, al
jz	short loc_43BAF8
fild	dword ptr dword_7CC8884
push	0				; char
push	0Fh				; float
push	8				; int
push	offset byte_7CC4398		; int
fadd	dword ptr flt_4786D0
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BAF8:				; CODE XREF: sub_43B9D0+F3j
mov	al, byte_7CC88C2
test	al, al
jz	short locret_43BB34
fild	dword ptr dword_7CC8884
push	0				; char
push	4				; float
push	8				; int
push	offset byte_7CC8000		; int
fadd	dword ptr flt_478988
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

locret_43BB34:				; CODE XREF: sub_43B9D0+12Fj
retn
sub_43B9D0 endp

; ---------------------------------------------------------------------------
align 10h

; =============== S U B	R O U T	I N E =======================================


sub_43BB40 proc	near			; CODE XREF: sub_42E970+132Cp

var_18=	dword ptr -18h
var_14=	dword ptr -14h

mov	al, byte_7CC88BF
test	al, al
jnz	short loc_43BB71
mov	al, byte_7CC88C0
test	al, al
jnz	short loc_43BB71
mov	al, byte_7CC88C1
test	al, al
jnz	short loc_43BB71
mov	al, byte_7CC88C2
test	al, al
jnz	short loc_43BB71
mov	al, byte_7CC88C3
test	al, al
jz	locret_43BCE4

loc_43BB71:				; CODE XREF: sub_43BB40+7j
					; sub_43BB40+10j ...
call	sub_44EE20
push	1
call	sub_44E240
mov	al, byte_7CC88BF
add	esp, 4
test	al, al
jz	short loc_43BBBC
fild	dword ptr dword_7CC3AEC
push	1				; char
push	8				; float
push	8				; int
push	offset word_7CC6C78		; int
fadd	dword ptr flt_478854
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF0
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BBBC:				; CODE XREF: sub_43BB40+47j
mov	al, byte_7CC88C0
test	al, al
jz	short loc_43BBF8
fild	dword ptr dword_7CC8884
push	1				; char
push	0Fh				; float
push	8				; int
push	offset byte_7CC4398		; int
fadd	dword ptr flt_4786D0
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BBF8:				; CODE XREF: sub_43BB40+83j
mov	al, byte_7CC88C3
test	al, al
jz	short loc_43BC67
fild	dword ptr dword_7CC3AF4
push	1				; char
push	4				; float
push	8				; int
push	offset word_7CC3B00		; int
fadd	dword ptr flt_4787D4
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
fild	dword ptr dword_7CC3AF4
add	esp, 18h
fadd	dword ptr flt_4786EC
push	1				; char
push	4				; float
push	8				; int
push	offset word_7CC63F0		; int
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC3AF8
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BC67:				; CODE XREF: sub_43BB40+BFj
mov	al, byte_7CC88C1
test	al, al
jz	short loc_43BCA3
fild	dword ptr dword_7CC8884
push	1				; char
push	0Fh				; float
push	8				; int
push	offset byte_7CC4398		; int
fadd	dword ptr flt_4786D0
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BCA3:				; CODE XREF: sub_43BB40+12Ej
mov	al, byte_7CC88C2
test	al, al
jz	short loc_43BCDF
fild	dword ptr dword_7CC8884
push	1				; char
push	4				; float
push	8				; int
push	offset byte_7CC8000		; int
fadd	dword ptr flt_478988
push	ecx
fstp	[esp+14h+var_14]		; float
fild	dword ptr dword_7CC8880
push	ecx
fadd	dword ptr flt_4786D4
fstp	[esp+18h+var_18]		; float
call	sub_436BD0
add	esp, 18h

loc_43BCDF:				; CODE XREF: sub_43BB40+16Aj
jmp	sub_44EF10
; ---------------------------------------------------------------------------

locret_43BCE4:				; CODE XREF: sub_43BB40+2Bj
retn
sub_43BB40 endp


end